mardi 7 janvier 2020

Cannot get record if not matched in second table in Laravel

I'm using laravel i want to get record from the first table even if it not exists in the second table but right now i'm getting the records only when if exist in both of the table :

$module=DB::table('r_module')->leftJoin('r_perm','r_perm.module_id','=','r_module.id')->where('r_perm.role_id',$id)->orWhereNull('r_perm.role_id')->get();


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire