ollieread / multiauth

Laravel multi auth
441 stars 109 forks source link

Auth Filter not working after implementing this library #19

Closed nebestpal closed 10 years ago

nebestpal commented 10 years ago

Auth Filter not working after implementing this library

ollieread commented 10 years ago

You need to update the auth filter to use this library, otherwise it's trying to access it using the style of the default library.

<?php
// original auth filter
Route::filter('auth', function()
{
    if (Auth::guest()) return Redirect::guest('login');
});

// new multiauth filter
Route::filter('auth', function()
{
if (Auth::admin()->guest()) return Redirect::guest('login');
});
nebestpal commented 10 years ago

Many thanks for your super fast response, it works fine after applying your solution. God bless you.