Browse Source

Moving auth constructor to app.

Taylor Otwell 9 years ago
parent
commit
61ff20256b
1 changed files with 15 additions and 0 deletions
  1. 15 0
      app/Http/Controllers/Auth/AuthController.php

+ 15 - 0
app/Http/Controllers/Auth/AuthController.php

@@ -18,4 +18,19 @@ class AuthController extends Controller {
 
 
 	use AuthenticatesAndRegistersUsers;
 	use AuthenticatesAndRegistersUsers;
 
 
+	/**
+	 * Create a new authentication controller instance.
+	 *
+	 * @param  \Illuminate\Contracts\Auth\Guard  $auth
+	 * @param  \Illuminate\Contracts\Auth\Registrar  $registrar
+	 * @return void
+	 */
+	public function __construct(Guard $auth, Registrar $registrar)
+	{
+		$this->auth = $auth;
+		$this->registrar = $registrar;
+
+		$this->middleware('guest', ['except' => 'getLogout']);
+	}
+
 }
 }