jeudi 28 juin 2018

check the user_id in the array

I have logged as approver_id ='897'. Request table have request_id,approver_id

request_id  approver_id
 005         897
 006         [897,91] 
 007         91 

I want to fetch the records where $approver_id is 897In a laravel query I have to get the row where the approver_id is 897 so expected 005 and 006

 $user=".."; //Query stuff
 $user=$user->where('request.flag','=','1')
 ->orwhereIN('asset_request.approver_id',array($approver_id))->get();

I didn't get any rows how to check the approver_idis in the table row



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire