2017-11-06 1 views
0

Nach dem Upgrade von Laravel von 5.0 auf 5.1 habe ich Probleme mit Login-Benutzer in meinem AuthController.Laravel Upgrade 5.0 zu 5.1 Login-Problem

Alte Baumeister:

public function __construct(Guard $auth, Registrar $registrar) 
{ 
    $this->auth = $auth; 
    $this->registrar = $registrar; 

    $this->middleware('guest', ['except' => 'getLogout']); 
} 

New Konstruktor:

public function __construct() 
{ 
    $this->middleware('guest', ['except' => 'getLogout']); 
} 

Und hier arbeiten nicht $this->auth->login($user);

public function getConfirmation($confirmationCode = null) 
{ 
    if ($confirmationCode) { 
     $user = User::where('confirmation_code', '=', $confirmationCode)->first(); 

     if ($user) { 
      $user->update([ 
       'confirmed'   => 1, 
       'confirmation_code' => null 
      ]); 

      $this->auth->login($user); 
      return redirect()->action('[email protected]_page', $user->name); 
     } 
    } 

    return view('auth.confirm'); 
} 

Wie ich $this->auth->login($user) ändern muss?

+0

hinzufügen, haben Sie versucht, Cache & 'Composer Dump Autoload' zu löschen? – Webinion

+1

Probieren Auth :: Login ($ user) – HasilT

+0

Was nicht funktioniert ?? Bitte geben Sie die Ausnahme, die es wirft. –

Antwort