Skip to content

Instantly share code, notes, and snippets.

@blogcacanid
Created June 16, 2020 00:14
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 blogcacanid/b082da718a7e55cc07c4e5ff9aa72772 to your computer and use it in GitHub Desktop.
Save blogcacanid/b082da718a7e55cc07c4e5ff9aa72772 to your computer and use it in GitHub Desktop.
web.php Back End Product Lumen 7
$router->group(['prefix' => 'api'], function() use ($router) {
$router->get('products', 'ProductController@index');
$router->get('products_page', 'ProductController@index_page');
$router->post('products', 'ProductController@store');
$router->get('product/edit/{id}', 'ProductController@show');
$router->get('product/{id}', 'ProductController@show');
$router->put('product/{id}', 'ProductController@update');
$router->delete('product/{id}', 'ProductController@delete');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment