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

You can make a Route::group to do this!

http://laravel.com/docs/routing#route-groups

So for example

Route::filter('auth', function()
{
    if (Auth::check())
    {
        // Redirect to admin area
    }

    Redirect::to('login');
});

Route::group(array('before' => 'auth'), function() 
{
    Route::controller('news', 'NewsController');
    Route::controller('article', 'ArticleController');
    Route::controller('albume', 'AlbumeController'
    Route::controller('staticcontent', 'StaticContentController');
    Route::controller('links', 'LinksController');
    // More routes to add...
});
Last updated 2 years ago.
0

i test it but it dosnt work for me !!

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.