rapyd-laravel
rapyd-laravel copied to clipboard
Cannot disable demo routes.
Hello,
First of all thanks a lot for a great package you put a lot of work into it and it shows.
I would like to re-open issue #261, publishing your own route file named '/Http/rapyd.php' does not remove the demo routes, they are still loaded from the RapydServiceProvider on line 33. Here is the offending bit:
if (! $this->app->routesAreCached()) {
require __DIR__.'/routes.php';
}
Not sure why that piece of code is required. But it overwrites our locally deployed route file, even if we generate a cached route file with the artisan route:cache
command as the routes are not initially cached the package routes are loaded into the cache.
Am I missing something, or can those 3 line just be deleted? All they look to be doing is prevent any routing error when the package is just deployed/installed in the case where route caching is used. But it has the side effect of 1) bypassing the intent of route caching by forcing additional route processing and 2) preventing us from disabling the demo routes.
Thanks. /S