I am trying to call middle-ware in constructor of my controller.
My PostController class is below
class PostController extends Controller
{
public function __construct()
{
$this->middleware( ['auth:admin', ['only'=> ['store', 'update']]], ['auth:client', ['only'=> ['index', 'view']]]);
}
}
Please suggestion or correct me if I am wrong.