Hey guys I have this: $fetchedUser = DB::table('users')->where('first_nome', $nome)->get(); $f_nome = $fetchedUser->first_nome; return ($f_nome);
I want to return the a name and maybe some other data of the fetched user. But I get an error of "Trying to get property of non-object"
So I did this: $fetchedUser = DB::table('users')->where('first_nome', $nome)->get(); return ($fetchedUser);
And I get a long array with the fetched user's info from the DB..
So my question is this, how do i return $nome only?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2bEwWYQ
via IFTTT
Aucun commentaire:
Enregistrer un commentaire