-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Routes won't be registered automatically #4
Comments
Hmm not as intended indeed. Routes are loaded if it is laravel-stagefront/routes/routes.php Line 7 in 502f558
|
After removing the routes code from the web.php file again I ran some artisan commands (clear config, clear view, clear cache, etc.). After running Hope that helps you to maybe find a solution for that behaviour or maybe adding this to the documentation in case you can reproduce the same problem. |
If I understand correctly, your routes were already cached when you enabled StageFront? If you want to enable/disable on runtime (while routes are cached), that means we can't rely on route caching for the StageFront routes. We would need to load the routes another way. Edit: same goes for the config cache. Which we probably can't bypass... |
That's correct. I worked locally with Valet and by default, Routes are cached I think. When deploying with Forge for example, Routes should be recached automatically so it shouldn't be an issue then. As you said, there is probably no solution for taking care of updating the cache automatically after setting up StageFront without a major change in how routes are working currently. I guess the easiest solution would be to just add a note or section to the Documentation with the Feel free to close the Issue, everything is working perfectly fine now! |
Hmm, routes shouldn't be cached by default, unless you or your deploy script caches them. I will leave this open until I add a note of this to the readme. |
After successfully installing everything via composer require and setting up the Middleware and updating the .ENV variables with the Quick setup via php artisan. Everything worked fine. After clearing config, view and route cache I reloaded the website but nothing happened. I got a 404 error that the page was not found (/stagefront or /login). I checked the web.php routes file and it didn't have any new configuration or code added. I had to manually add the code from the repo under routes/routes.php to my web.php in order for Stagefront to work properly.
I don't think this is a proper solution nor the indented behaviour as your Readme states Routes should be registered automatically. I'm using Laravel 8.16.1 and "codezero/laravel-stagefront": "^2.3"
If you need any code or other info please let me know.
The text was updated successfully, but these errors were encountered: