Replies: 1 comment 1 reply
-
Can you put that code in a statamic booted callback? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Before submitting a bug report I want to see if there's another solution for my specific situation.
I have a Statamic website with Jetstream installed and I have dynamic routes for the terms and privacy pages. The page IDs are stored in a global and the routes are created for the page's slug within
routes/jetstream.php
.I recently started the update to Statamic 5 and Laravel 11, but broke this code. It now throws a
Symfony\Component\Routing\Exception\RouteNotFoundException
with the message "Route [statamic.cp.collections.entries.edit] not defined.". Which seems logical to me, becauseroutes/jetstream.php
is loaded before the Statamic CP routes are loaded.My current work-around is to temporarily disable the CP, add the routes and re-enable the CP again.
Does anyone have a suggestion to improve this?
Excerpt of
routes/jetstream.php
:Simplified version of my helper
App\Helpers\Statamic
:Beta Was this translation helpful? Give feedback.
All reactions