Created
June 18, 2018 06:46
-
-
Save jinoantony/ad51310701c80bcff6ed96d662615891 to your computer and use it in GitHub Desktop.
SubadminLoginController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\Auth; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Foundation\Auth\AuthenticatesUsers; | |
class SubadminLoginController extends Controller | |
{ | |
/* | |
|-------------------------------------------------------------------------- | |
| Login Controller | |
|-------------------------------------------------------------------------- | |
| | |
| This controller handles authenticating users for the application and | |
| redirecting them to your home screen. The controller uses a trait | |
| to conveniently provide its functionality to your applications. | |
| | |
*/ | |
use AuthenticatesUsers; | |
/** | |
* Where to redirect users after login. | |
* | |
* @var string | |
*/ | |
protected $redirectTo = 'subadmin/home'; | |
/** | |
* Create a new controller instance. | |
* | |
* @return void | |
*/ | |
public function __construct() | |
{ | |
$this->middleware('guest:subadmin,subadmin/home')->except('logout'); | |
} | |
public function redirectTo() | |
{ | |
return 'subadmin/home'; | |
} | |
protected function guard() | |
{ | |
return \Auth::guard('subadmin'); | |
} | |
public function showLoginForm() | |
{ | |
return view('auth.subadminlogin'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment