group('/locations', function($app) { $app->post('/add', [Locations::class, 'add']); $app->get('[/]', Locations::class); }); $app->group('/location/{location_id}', function($app) { $app->put('/edit', [Locations::class, 'edit']); $app->delete('/delete', [Locations::class, 'delete']); $app->get('[/]', [Locations::class, 'show']); });