<?php
// laravel if else condition in query
$query = SocialMediaFeed::where('location_id', $location_id);
if(!$filters) {
$query = $query->where('self', '<>', true);
} else {
$query = $query->orWhere('self', true);
}
?>
<?php
Practical tutorials for students and developers — learn concepts, follow examples, build projects and improve one lesson at a time.
ProgrammerCodes4u provides practical, step-by-step learning resources for web development, programming, databases, SEO, and modern developer tools.
0 Comments