jeudi 1 février 2018

Load Router instance in Laravel to check middleware

I am trying to check whether a given middleware group contains a certain middleware. I can see the information exists within \Illuminate\Routing\Router on the $request->route() var but I am unsure how to access this information as the $request->route()->router property is protected.

Here is my output from doing a dd within Handler.php

dd($request->route());

Highlighted is the item I am trying to access

enter image description here



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire