sdavis1902 / laravel-controller-routes
In Laravel 5.3 Route::controller was removed. This package replaces that functionality if you still want to use it.
Installs: 3 596
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: ~5.6|~7.0
- illuminate/support: ~5.1
Requires (Dev)
- phpunit/phpunit: ~4.0||~5.0
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2024-11-15 23:53:58 UTC
README
As of Laravel 5.3, Route::controller was removed. This provides the same functionality.
Install
Via Composer
$ composer require sdavis1902/laravel-controller-routes
Once installed add the service provider and alias ( not required for 5.5 )
'providers' => [ ... sdavis1902\LaravelControllerRoutes\LaravelControllerRoutesServiceProvider::class, ],
'aliases' => [ ... 'MoreRoute' => sdavis1902\LaravelControllerRoutes\Facades\MoreRoute::class, ],
Usage
In your routes file
MoreRoute::controller('/test', 'TestController');
Your Controller
class TestController extends Controller { public function getFrank(){ return 'woo'; } }
You can now go to yourdomain.comm/test/frank and it should say "woo"
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Credits
License
The MIT License (MIT). Please see License File for more information.