Answers for "call the middleware method from the controller's constructor instead of attaching it in the route definition directly:"

0

call the middleware method from the controller's constructor instead of attaching it in the route definition directly:

public function __construct()
{
$this->middleware('auth');
}
Posted by: Guest on October-20-2021

Code answers related to "call the middleware method from the controller's constructor instead of attaching it in the route definition directly:"

Browse Popular Code Answers by Language