jeudi 12 juillet 2018

Select return null

In the database I have a query:

SELECT * FROM `users` WHERE email like '%12@12.ru%' 

But in controller I got null:

$user=DB::select('select * from users where email like ?',[$user_email]);
    dump($user);

Or:

$user=User::select([  'name', 'email', 'password','token','is_conferd','active'])
    ->where('email', 'like',$user_email)
    ->first();
    dump($user);



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire