Skip to content

Instantly share code, notes, and snippets.

@devmeireles
Created April 23, 2019 12:14
Show Gist options
  • Save devmeireles/a7ae8f1e6a08b3b08bf0ae0a464f5e14 to your computer and use it in GitHub Desktop.
Save devmeireles/a7ae8f1e6a08b3b08bf0ae0a464f5e14 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->get('/', function () use ($router) {
return $router->app->version();
});
$router->get('/api/book', 'BookController@index');
$router->get('/api/book/{id}', 'BookController@show');
$router->post('/api/book', 'BookController@store');
$router->put('/api/book/{id}', 'BookController@update');
$router->delete('/api/book/{id}', 'BookController@destroy');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment