问题
Been using laravel (current stable version) for 2 days now, and after reading the documentation... played a bit with the templating systems and some other stuff.
Now after installing Authority bundle along with Laravel-Administrator the problem I have is that when I try opening http://local.laravel/admin which redirects me to http://local.laravel/user/login and it's when the 404 magic happens.
My logs point good and I really don't know where else or what else to do, to try and debug this... any ideas?
回答1:
I am the creator of the Authority bundle, All I can tell you is that it doesn't do any redirects, so you will have to look at the administrative bundle.
Good luck!
回答2:
For anyone beginning with Laravel and stept into this problem, I had to set up the login form in order form, which it's not mentioned in the mentioned Bundle's install tutorials.
- I changed
user/logintologininconfig/administrator.php -> login_path - Added the router to handle the login and logout
More detail in this article http://codehappy.daylerees.com/authentication
回答3:
Hey I wrote the Administrator bundle. Check out this section of the docs:
https://github.com/FrozenNode/Laravel-Administrator#installation--documentation
Notice in the config there are several options: auth_check, login_path, and login_redirect_key. What appears to be happening here is that your auth_check is being run, it fails, and then redirects you to the default login_path, which you probably don't have on your system. I'm guessing you haven't set these configuration options up, but they are pretty much required! I set it up this way because I wanted to let devs use their own auth system for the admin panel.
Update: Check out the configuration docs section on the permission, login_path, and login_redirect_key.
来源:https://stackoverflow.com/questions/13917665/laravel-authorization-404