Skip to content

Instantly share code, notes, and snippets.

@geggleto
Created February 25, 2015 16:49
Show Gist options
  • Select an option

  • Save geggleto/10b40248e41f41ef7326 to your computer and use it in GitHub Desktop.

Select an option

Save geggleto/10b40248e41f41ef7326 to your computer and use it in GitHub Desktop.
<?php
/* Show all and featured ideas routes */
$app->get('/', 'Idiaz\Action\IdeasBrowseAction:__invoke')->name('ideas');
$app->get('/ideas', 'Idiaz\Action\IdeasFeaturedAction:__invoke')->name('ideas.featured');
/* New idea routes */
$app->get('/ideas/new', 'Idiaz\Action\IdeasCreateAction:__invoke')->name('ideas.create');
$app->post('/ideas/new', 'Idiaz\Action\IdeasStoreAction:__invoke')->name('ideas.store');
/* Show a route */
$app->get('/ideas/:id', 'Idiaz\Action\IdeasShowAction:__invoke')->name('ideas.show');
/* Editing idea routes */
$app->get('/ideas/:id/edit', 'Idiaz\Action\IdeasEditAction:__invoke')->name('ideas.edit');
$app->post('/ideas/:id/edit', 'Idiaz\Action\IdeasUpdateAction:__invoke')->name('ideas.update');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment