Support the ongoing development of Laravel.io →
posted 7 years ago
Authentication
Last updated 4 months 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\[email protected]'));
 });
});

Answers the path \admin\pages\

Last updated 4 months ago.
0

whoooo!! thank you! =)

Last updated 4 months ago.
0

Sign in to participate in this thread!

Cloudways

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?

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

© 2022 Laravel.io - All rights reserved.