Downloads
Stars
Version
A command to replace deprecated Route::controller()
and Route::controllers()
with explicit routes.
In laravel 5.3 implicit controller routes will be removed from the framework, the functionality will likely be extracted into a separate package, however if you'd like to make the move and start using explicit routes this package will help you.
composer require themsaid/laravel-routes-publisher
Include the following command in your $commands
attribute of app/Console/Kernel.php
:
\Themsaid\RoutesPublisher\RoutesPublisherCommand::class
Run the following command:
php artisan themsaid:publishRoutes
After the command is done, two new files will be generated in your app/Http
directory:
routes.php.generated
routes.php.backup
Replace the content of your routes.php
file with that of routes.php.generated
, knowing that if anything went wrong a backup
of your original routes.php
's content will be available in routes.php.backup
.
routes.php
doesn't contain any PHP syntax errors.routes.php
file is located in app\Http\routes.php
with the exact name.routes.php
files doesn't include any other file using include
or require
.composer.json
.I tried hard to cover different syntax and file formatting in this package, however if you found any problems while using the package please open a new issue.