Skip to content

Instantly share code, notes, and snippets.

@rtablada
Last active August 29, 2015 13:56
Show Gist options
  • Save rtablada/9241136 to your computer and use it in GitHub Desktop.
Save rtablada/9241136 to your computer and use it in GitHub Desktop.
Thoughts on literate Laravel Routes
<?php
// Images
Route::get('images', ['uses' => 'Images@index', 'as' => 'images.index']);
Route::get('images/new', ['uses' => 'Images@create', 'as' => 'images.create']);
Route::post('images', ['uses' => 'Images@store', 'as' => 'images.store']);
# Images
* [ ] Users can view all images that have been uploaded
* [ ] Images data table
* [ ] Title
* [ ] Description
* [ ] Users can go to view details of existing image records
* [ ] Users can delete existing image records
* [ ] Users can create a new image record
@get('images', ['uses' => 'Images@index', 'as' => 'images.index'])
* [ ] Users can create images
* [ ] Form
* [ ] Image Upload
* [ ] Create thumbnail
* [ ] Title
* [ ] Description
@get('images/new', ['uses' => 'Images@create', 'as' => 'images.create'])
@post('images', ['uses' => 'Images@store', 'as' => 'images.store'])
...
# Posts
...
<?php
// Images
/*
* [ ] Users can view all images that have been uploaded
* [ ] Images data table
* [ ] Title
* [ ] Description
* [ ] Users can go to view details of existing image records
* [ ] Users can delete existing image records
* [ ] Users can create a new image record
*/
Route::get('images', ['uses' => 'Images@index', 'as' => 'images.index']);
/*
* [ ] Users can create images
* [ ] Form
* [ ] Image Upload
* [ ] Create thumbnail
* [ ] Title
* [ ] Description
*/
Route::get('images/new', ['uses' => 'Images@create', 'as' => 'images.create']);
Route::post('images', ['uses' => 'Images@store', 'as' => 'images.store']);
// Posts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment