Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel auth user in constructor

public function __construct()
{
  $this->middleware(function ($request, $next) {
    $this->user = Auth::user();
    return $next($request);
  });
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #auth #user #constructor
ADD COMMENT
Topic
Name
1+1 =