Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/julles/route-controller

Laravel 5.3++ Route Controller
https://github.com/julles/route-controller

controller indonesia laravel laravel5 package route routecontroller

Last synced: about 2 months ago
JSON representation

Laravel 5.3++ Route Controller

Awesome Lists containing this project

README

        

# Route Controller For Laravel 5.3++

[![Total Downloads](https://poser.pugx.org/muhamadrezaar/route-controller/d/total.svg)](https://packagist.org/packages/muhamadrezaar/route-controller)
[![License](https://poser.pugx.org/muhamadrezaar/route-controller/license.svg)](https://packagist.org/packages/muhamadrezaar/route-controller)

If you are used to using laravel 4 or laravel 5.2 you may be familiar with Route :: controller, but unfortunately in laravel 5.3 ++ Route Controller will be deleted.

But do not worry, by using this package you can reuse the artificial route controller and maintained by me ([Muhamad Reza AR])

[Muhamad Reza AR]:

## How to Install ?

Add Packages in composer

``` sh
composer require muhamadrezaar/route-controller
```

Add service provider and facade

``` sh
Julles\RouteControllerProvider::class,
```

``` sh
'RouteController'=>Julles\RouteControllerFacade::class,
```

## How to Use ?

in route file (routes/web.php)

``` sh
\RouteController::build('tes','TesController');
```

Samples Methods in Source Controller

``` sh

public function getIndex() // url generated : yoururl.dev/tes or yoururl.dev/tes/index
{
dd('hello world');
}

public function getTriRiska() // url generated yoururl.dev/tes/tri-riska
{
dd('My Friend');
}

public function postCreate() // url generated yoururl.dev/tes/create
{

}

```

## License

MIT

https://reza.mit-license.org/

ENJOY!!