Open Heqma opened 4 years ago
Even if it show that error commands are actually working, so even if not ideal is still functional. Not sure what's happening but I suppose those commands are killing the session in some way so that's not possibile to show the result.
put use TCG\Voyager\Http\Middleware\VoyagerAdminMiddleware;
and
$this->middleware(VoyagerAdminMiddleware::class);
in the construct
Can you explain the construc?
I did not understand, where to put these lines that you mentioned.
Can you explain the construc?
I did not understand, where to put these lines that you mentioned.
better use php artisan optimize:clear i solve mine using this
I tried php artisan optimize:clear but not solved.
the error is still relevant. Is there a solution?
How are you coming to this error? Either you're trying to use the master blade in a place where a user isn't logged in or you don't have user(s) in the database. Auth::user() is returning null or false instead of a User.
You can also enter commands directly into the console. Then the error message will be in \storage\logs\
Everything works correctly, but caching works out with an error Auth::user() is returning null
I have not tried to use or redefine master blade. It is only used automatically by Voyager itself
Version information
Description
I'm trying to cache files in /admin/compass "php artisan config:cache / php artisan route:cache"
Logs
[2020-09-27 14:12:31] local.ERROR: Trying to get property 'avatar' of non-object (View: /home/servername/domains/mydomain/subdomain/vendor/tcg/voyager/resources/views/master.blade.php) {"exception":"[object] (Facade\Ignition\Exceptions\ViewException(code: 0): Trying to get property 'avatar' of non-object (View: /home/servername/domains/mydomain/subdomain/vendor/tcg/voyager/resources/views/master.blade.php) at /home/servername/domains/mydomain/subdomain/vendor/tcg/voyager/src/../resources/views/master.blade.php:67)
Master.blade.php:67 start from if