Skip to content

Instantly share code, notes, and snippets.

public function map(Registrar $router)
{
$router->group(['middleware' => 'auth'], function ($router) {
$router->get('api/clients', 'ClientController@index');
$router->get('api/clients/{id}', 'ClientController@show');
$router->post('api/clients', 'ClientController@store');
$router->put('api/clients/{id}', 'ClientController@update');
$router->delete('api/clients/{id}', 'ClientController@delete');