Skip to content

Instantly share code, notes, and snippets.

@fokosun
Created October 10, 2017 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fokosun/7778610815d82274332b1a69e6349b5c to your computer and use it in GitHub Desktop.
Save fokosun/7778610815d82274332b1a69e6349b5c to your computer and use it in GitHub Desktop.
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/
$router->group(
[
'prefix' => '/users'
], function ($router) {
$router->get('/', 'UserController@index');
$router->post('/', 'UserController@store');
$router->get('/{id}', 'UserController@show');
$router->put('/{id}', 'UserController@update');
$router->delete('/{id}', 'UserController@delete');
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment