vendredi 5 juin 2020

Laravel: Auth::user()->id Trying to get property 'name' of non-object

i'm Getting an error 'Trying to get property 'name' of non-object ' when i Trying to open dashboard page

enter image description here

There is my codes :

in UserController.php

    public function index(Request $request)
{
    $result = User::orderBy('name','asc')->get();
    return view('admin.user.index',[ 'data'=>$result ]);
}


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

Aucun commentaire:

Enregistrer un commentaire