Open mediaceh opened 7 years ago
Yes. I use it this way (but without the auth middleware that is useless to me).
public function __construct()
{
$this->middleware('jwt.auth');
parent::__construct();
}
You can even use it partially like explained in Laravel docs (5.2)
$this->middleware('jwt.auth', ['except' => [
'index',
'show'
]]);
5.3 way (I'm still using the 5.2 way which is OK)
$this->middleware('jwt.auth')->except([
'index',
'show'
]);
Is it possible use it common in controller constructor as
or not?