authentication - Laravel: Dependency Inject Auth -
authentication - Laravel: Dependency Inject Auth -
how dependency inject auth in laravel?
like this:
 public function __construct(auth $auth)     {       $this->auth = $auth;      }    if not work:
$user_type = auth::user()->user_type;       
you should type hint illuminate\auth\authmanager:
public function __construct(illuminate\auth\authmanager $auth) {   $this->auth = $auth; }        authentication laravel laravel-4 dependency-injection 
 
  
Comments
Post a Comment