sdavis1902/laravel-controller-routes

In Laravel 5.3 Route::controller was removed. This package replaces that functionality if you still want to use it.
3,846 3
Install
composer require sdavis1902/laravel-controller-routes
Latest Version:2.0.4
PHP:~5.6|~7.0
License:MIT
Last Updated:Aug 31, 2017
Links: GitHub  ·  Packagist
Maintainer: sdavis1902

laravel-controller-routes

Software License Total Downloads

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.

Related Packages

sdavis1902/eloquent-vars

Add ability to save additional fields or Vars on a Laravel model without a speci...

15,178 1
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

631,580,251 9,707
laravel/framework

The Laravel Framework.

580,311,802 34,925
laravel/tinker

Powerful REPL for the Laravel framework.

489,754,436 7,444
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

404,034,618 608