<?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);
}
?>
Programing Coderfunda
December 12, 2020
Laravel
No comments
<?php
0 comments:
Post a Comment
Thanks