Laravel documentation says that we can pass parameter to a middleware specifying with :
. here
So, If I am passing a guard as a parameter to guest
or auth
middleware like :
$this->middleware('guest:admin')
OR
$this->middleware('auth:admin')
What does that mean?
As here in AdminController.php
class AdminController extends Controller
{
use AuthenticatesUsers;
protected $redirectTo = '/admin/dashboard';
public function __construct()
{
$this->middleware('auth:admin')->except(['show_login','login']);
$this->middleware('guest:admin')->only(['show_login','login']);
}
}
from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2IdiFEK
via IFTTT
Aucun commentaire:
Enregistrer un commentaire