Skip to content

Instantly share code, notes, and snippets.

@stephenjude
Created June 3, 2018 23:17
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 stephenjude/977e538442a40dc617207347ff0f12c8 to your computer and use it in GitHub Desktop.
Save stephenjude/977e538442a40dc617207347ff0f12c8 to your computer and use it in GitHub Desktop.
<?php
$app->get('/', function () use ($app) {
return $app->version();
});
//product routes
$app->get('products', 'ProductsController@index');
$app->get('products/{id}', 'ProductsController@show');
$app->put('products/{id}', 'ProductsController@update');
$app->post('products', 'ProductsController@store');
$app->delete('products/{id}', 'ProductsController@destroy');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment