zaster

Resourceful Route Order - Does it matter?

Posted 1 month ago by zaster
Route::resource('photos', 'PhotoController');

Give the below order

photos.store
photos.index
photos.create
photos.show
photos.update
photos.destroy
photos.edit

But should we organize our routes as below mentioned ? Does the order matter ?

photos.edit   //photos/{photo}/edit
photos.update //photos/{photo}/update
photos.create //photos/create
photos.show   //photos/{photo}
photos.destroy//photos/{photo}
photos.index  //photos
photos.store  //photos

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.