Resource Controllers: Supplementing Resource Controllers

Supplementing Resource Controllers

Route::get('photos/popular', 'PhotoController@method');


Route::resource('photos', 'PhotoController');

If you need to add additional routes to a resource controller beyond the default set of resource routes, you should define those routes before your call to Route::resource; otherwise, the routes defined by the resource method may unintentionally take precedence over your supplemental routes.

Related concepts

Resource Controllers: Supplementing Resource Controllers — Structure map

Clickable & Draggable!

Resource Controllers: Supplementing Resource Controllers — Related pages: