mirror of
https://gitlab.com/izyim/prototypes/lumen-microservices/microservice-products-api.git
synced 2026-08-19 04:14:09 +00:00
23 lines
903 B
PHP
23 lines
903 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->group(['prefix' => 'api'], function () use ($router) {
|
|
$router->group(['prefix' => 'product'], function () use ($router) {
|
|
$router->get('/', ['uses' => 'ProductController@index']);
|
|
$router->post('/', ['uses' => 'ProductController@store']);
|
|
$router->get('/{product}', ['uses' => 'ProductController@show']);
|
|
$router->patch('/{product}', ['uses' => 'ProductController@update']);
|
|
$router->delete('/{product}', ['uses' => 'ProductController@destroy']);
|
|
});
|
|
}); |