multi routes issus
jalenjie opened this issue · 1 comments
jalenjie commented
my auth.php config
'multi' => array(
'admin' => array(
'driver' => 'eloquent',
'model' => 'admin'
),
'user' => array(
'driver' => 'database',
'table' => 'users'
)
),
my routes.php
Route::controller('admin/auth','Admin\AuthController');
Route::group(array('prefix' => '/admin','before' => 'auth'),function(){
Route::get('/','Admin\HomeController@index');
Route::controller('thread','Admin\ThreadController');
});
before => "auth" there , how to write?? auth.admin?? or other
tks..
ollieread commented
This package doesn't come with filters, you have to create those yourself. See the documentation on filters for more information. As an example, you could do the following.
Route::filter('auth.admin', function() {
if (!Auth::admin()->check()) return Redirect::route('admin.login');
});