You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
is it possible to respect order of initialization in app/providers.php?
My app providers order:
App\Providers\AnnotationsServiceProvider::class,
App\Providers\RouteServiceProvider::class,
The intro:
I am using RouteServiceProvider with some routes in web.php
I am using fallback route Route::get('/{any}', ...) to catch all undefined routes - lets call this route "fallback_route"
I created route via annotation + route is cached (with artisan route:scan) - lets call this route "route_a"
The problem:
when I want to visit "route_a" I am getting "fallback_route"
when I disable "fallback_route" then "route_a" is working
seems like anotation routes are inserted after RouterServiceProvider even I initialized AnnotationsServiceProvider before RouterServiceProvider
Solution:
A) Respect order of providers in app/provider.php
B) Somehow trigger annotations boot method before RouterServiceProvider class
C) please suggest solution
Could you pleaase help me?
Thank you
The text was updated successfully, but these errors were encountered:
josefryzi
changed the title
Comaptibility with RouteServiceProvider - respect the order of initialization
Compatibility with RouteServiceProvider - respect the order of initialization
Nov 8, 2021
Hi,
is it possible to respect order of initialization in app/providers.php?
My app providers order:
The intro:
The problem:
Solution:
A) Respect order of providers in app/provider.php
B) Somehow trigger annotations boot method before RouterServiceProvider class
C) please suggest solution
Could you pleaase help me?
Thank you
The text was updated successfully, but these errors were encountered: