Answers for "laravel auth user blade"

PHP
2

is users logged in laravel blade

@auth
  // user logged in
  @else
  // not logged in
@endauth
Posted by: Guest on May-07-2021
1

laravel auth user in constructor

public function __construct()
{
  $this->middleware(function ($request, $next) {
    $this->user = Auth::user();
    return $next($request);
  });
}
Posted by: Guest on July-22-2021

Browse Popular Code Answers by Language