Hello,
Im pretty new on laravel, and today i'm stuck on simple (it looks like) thing. I have named route. This is a proof:
When users tries to access admin part, i'm filtering in this way:
Route::filter('admin', function($route) {
if ($route->getName() != 'admin.login') { return Redirect::route('admin.login'); }
});
Route::when('admin*', 'admin');
I'v tried to debug this by doing die() with some methods, but Route::currentRouteName() or $route->getName() always returns null.
My routes described in this way:
Route::group(array('prefix' => 'admin', 'namespace' => 'admin'), function()
{
Route::controller('/', 'HomeController');
Route::controller('users', 'UsersController', ['getLogin' => 'admin.login']);
});
Thank you. Btw, amazing framework. I'v worked on RoR, it was far away from most php frameworks, but laravel is very close :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community