Created
January 7, 2014 18:00
-
-
Save ollieread/8303638 to your computer and use it in GitHub Desktop.
Replacing the default auth filter with one for multiauth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I figured it out. Did a couple of tests with
php artisan tinker
and was successfully able to logout a user with the above code adjustment in filter.php