Support the ongoing development of Laravel.io →
Authentication Security Database
Last updated 2 years ago.
0

You can change the model and table under config/auth.php

Last updated 2 years ago.
0

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 :)

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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?

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

I did it as @Marvelln said and it works like a charm :) Thanks for the help

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.