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
Until I run php artisan route:cache the link in the menu is correct
After the cache, the link goes to /users without the group prefix
Setting ->forModule('app.users') (the route being listed as twill.app.users.index results in
Which is not a descriptive error message
Setting ->forRoute('twill.app.users.index') gives the desired result but it's weird to have the behavior differ between route cached or not (routes are only cached when staging so it's not caught straight away)
The text was updated successfully, but these errors were encountered:
Very likely due to $this->addToRouteRegistry($slug, $customRoutePrefix); which is a side effect in the route registration
My biggest problem is the fact that the twill users management is registered as the users module which is very easy to conflict with user being a very common model name, maybe we should have the default user route under a prefix to avoid those issues (but would have to be v4 likely or maybe in v3 it could be enabled with an option)
ifox
changed the title
When routes are cached, twill navigation doesn't use the correct module
Prefix internal Twill users module routes to prevent conflicts with another User model
May 30, 2024
ifox
changed the title
Prefix internal Twill users module routes to prevent conflicts with another User model
[4.x] Prefix internal Twill users module routes to prevent conflicts with another User model
May 30, 2024
Given the following twill route
And the following navigation
Until I run
php artisan route:cache
the link in the menu is correctAfter the cache, the link goes to
/users
without the group prefixSetting
->forModule('app.users')
(the route being listed astwill.app.users.index
results inWhich is not a descriptive error message
Setting
->forRoute('twill.app.users.index')
gives the desired result but it's weird to have the behavior differ between route cached or not (routes are only cached when staging so it's not caught straight away)The text was updated successfully, but these errors were encountered: