jeudi 24 juin 2021

The query is not working properly. filter in laravel

$data = Orders::join('order_details','order_details.orders_id','=','orders.id')
            ->join('users','users.id','=','orders.user_id') 
            ->select('orders.*','order_details.total_pay','users.first_name','users.last_name') 
            ->where(function($query) use ($user_name,$promotion_code,$status){
                $query->orwhereRaw("concat(first_name, ' ', last_name) like '%$user_name%'")
                ->Where('promotion_code', $promotion_code)
                ->Where('status', $status);             
            }); 

1.When I search all three data at the same time it's ok . But why I input 1/3 data or 2/3 data it doesn't filter?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3h46kUP
via IFTTT

Aucun commentaire:

Enregistrer un commentaire