you're getting an error cause when you use a blade directive, you don't need to use {{ }}
to get a variable value, so the right syntax is:
@if ( Auth::guard("employee")->check() )
...
@endif
one more thing, the check()
method returns a boolean so you can't chain with the user()
method. so what you need to do is
@if ( Auth::guard("employee")->check() )
<p>welcome {{Auth::user()->name}} !<p>
@endif
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.