Support the ongoing development of Laravel.io →
posted 10 years ago
Authentication
Last updated 2 years ago.
0

You should be able to wrap the routes in a group,

Route::group(array('before' => 'auth'), function()
{ 
   .... normal routes here
});

or if you have a admin path you could use

Route::group(array('prefix' => 'admin', 'before' => 'auth'), function()
{
 ... normal routes here
});

This would be for the \admin\blah path.

You can also nest groups... here is a snip from my admin routes

Route::group(array('prefix' => 'admin', 'before' => 'auth'), function()
{
Route::group(array('prefix' => 'pages'), function()
 {
 Route::get('/', array('as' => 'admin-pages', 'uses' => 'Wpb\AdminModule\Controllers\PageController@getIndex'));
 });
});

Answers the path \admin\pages\

Last updated 2 years ago.
0

whoooo!! thank you! =)

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

punchi punchi Joined 15 Sep 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.