Answers for "laravel where condition in another table"

PHP
1

two condition in one laravel query

$data = Sub_sub_category::select('sub_sub_cat_name','id')->where('sub_cat_id',$request->id)->where('status','1')->get();
Posted by: Guest on July-02-2021
0

Laravel - Add conditional where clause in query

$user_to_mail = User::where('store_id', $item->store_id)
                    ->when($store->notification_role_id > 0, function ($q) use ($store) {
                        return $q->where('role_id', $store->notification_role_id);
                    })
                    ->get();
Posted by: Guest on November-15-2021

Code answers related to "laravel where condition in another table"

Browse Popular Code Answers by Language