UniSharp / laravel-filemanager

Media gallery with CKEditor, TinyMCE and Summernote support. Built on Laravel file system.
https://unisharp.github.io/laravel-filemanager/
MIT License
2.04k stars 719 forks source link

Config option to turn off demo route #1206

Open Samvdg opened 6 months ago

Samvdg commented 6 months ago

It's a bit annoying to have an extra page available on your website that's more for admins to test. Not just for users. And adding a new route redirecting to an error for only this route seems unnecessary when we have a nice option to just create a boolean in the config file. It seems like it SHOULD be a functionality already instead of having to manually add this yourself

If you could add a config variable named 'demo_page_on' or something alike which is standard on true, that'd be great

Using Route::get('/demo', fn() => abort(418)); works fine after loading your routes but it would be more clean to just have a config option

streamtw commented 6 months ago

Agreed. This route was set as default enabled to provide a quick way to verify if installation is successful, for developers who are new to this package. But I agree that add a config or simply add some documentation will also do, since the demo page should not be accessed in production.