Skip to content

Instantly share code, notes, and snippets.

@jokamjohn
Created January 16, 2016 11:12
Show Gist options
  • Select an option

  • Save jokamjohn/42422147adc3e1582272 to your computer and use it in GitHub Desktop.

Select an option

Save jokamjohn/42422147adc3e1582272 to your computer and use it in GitHub Desktop.
Route groups
Route::group(['prefix' => 'admin', 'namespace' => 'backend', 'before' => 'admin'], function()
{
// only /admin/ routes in here that will be in a namespace folder of "backend" with admin middleware
Route::resource('pages', 'PagesController'); // app/Http/controllers/backend/PagesController.php
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment