ErrorException Trying to get property ‘name’ of non-object (View:

Ask New Question
  • ErrorException Trying to get property ‘name’ of non-object (View:

    I am a Laravel 8 learner and trying to understand the blade templating system of Laravel 8. I am trying to display my content inside the default AppLayout in slots variable. Now it is showing error on the front end at  resources\views/layouts/navigation.blade.php:26

    and here is the code at line 26

    <div>{{ Auth::user()->name }}</div>

    So as per me I think it is due to the calling of Auth model in another model (in my case it is Expense model). So how can I fix this?

    Reply
0 Replies
Reply To: ErrorException Trying to get property ‘name’ of non-object (View:
Your information: