You can change the model and table under config/auth.php
Hey Ivan,
Sure there is, check out the app/config/auth.php file, you can set table and model name there.
Edit: Ups, acchu1986 was faster :)
Thanks for the quick response, but I actually need two separate logins. Sorry fot not making that clear. I need one for normal login and one for an api basic auth. Info has to be in two separate tables.
faust-eight said:
Thanks for the quick response, but I actually need two separate logins. Sorry fot not making that clear. I need one for normal login and one for an api basic auth. Info has to be in two separate tables.
Did you manage to do this? I think the fastest way would be setting up a separate environment for the api path/subdomain. Have you tried that?
Not sure if it would work, but you could try with Config::set('auth.table', 'newTable');
before you use the auth method.
If it doesnt work you can use my custom detectEnivornment closure
to have a different environment depending on your url. Read about it on http://stackoverflow.com/a/21356618/397195.
I did it as @Marvelln said and it works like a charm :) Thanks for the help
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community