I'm trying to extend an existing application without modifying its source code. The application has a named route called wizard-add
. Is there a way to register \MyPackage\MyMiddleware
with the existing route? I tried attaching it via Route::getRoutes()->getByName('wizard-add')->middleware(\MyPackage\MyMiddleware::class);
but since packages are registered before the routes are read, Route::getRoutes()
returns an empty collection.
Thank you!
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/36dUwv8
via IFTTT
Aucun commentaire:
Enregistrer un commentaire