c3lf-system-3/routes/web.php
2019-11-15 21:59:47 +01:00

28 lines
904 B
PHP

<?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->group(['prefix' => 'api'], function () use ($router) {
$router->get('events', ['uses' => 'EventController@showAllAuthors']);
$router->get('events/{id}', ['uses' => 'EventController@showOneAuthor']);
$router->post('events', ['uses' => 'EventController@create']);
$router->delete('events/{id}', ['uses' => 'EventController@delete']);
$router->put('events/{id}', ['uses' => 'EventController@update']);
});