laravel-multiauth | MultiAuth for Laravel | Database library
kandi X-RAY | laravel-multiauth Summary
kandi X-RAY | laravel-multiauth Summary
This Package extends the default Auth library to allow logging in with accounts from different database tables or even different databases. For example if you want to save your backend and a frontend users in a different table to keep them separated.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get the current auth type .
- Call the Guard class .
- Merge the configuration into the app s config .
- Get an auth type
- Create the database user provider .
- Register the service provider .
- Impersonate a user .
- Get remember remember me name
- Get the name of the login field .
- Provides a list of authentication providers
laravel-multiauth Key Features
laravel-multiauth Examples and Code Snippets
Community Discussions
Trending Discussions on laravel-multiauth
QUESTION
I'm using bitfumes/laravel-multiauth Admin, I added my routes to the routes/admin.php but it shows me this error that it can't find my contoller.
...Target class [Bitfumes\Multiauth\Http\Controllers\admin\DashboardController] does not exist.
ANSWER
Answered 2019-Nov-19 at 15:31I found the solution for this Problem
In routes/admin.php
Add path to your controller :\App\Http\Controllers\Admin\PlaceController
QUESTION
As I know Auth::attempt
is used to authenticate users from users
table, but i want to authenticate another users from managers
table and admin from admins
table. I know there are laravel-multiauth
plugin already exist. But can we create our own AuthServiceProvider
for authenticating users from multiple tables..?
ANSWER
Answered 2017-Sep-21 at 05:49Try my idea if you want to. I'm expecting that different table
has different users
. Because it won't work if you have the same user
in other tables.
- Choose your priority table (e.g. users)
- Add the condition
if(Auth::user(attempt(...))
elseif(Auth::manager(attempt(...))
elseif(Auth::admins(attempt(...)))
Note: Your priority table here is users
, then if the user doesn't exists in that table, it will try the managers
table, then if still doesn't exists, it will check the admins
table, otherwise (use else
) return a message error.
Other option:
Other option is to use this package sarav/laravel-multiauth
. You can follow this thread. How to use authentication for multiple tables in Laravel 5 for more information.
More Reference:
Can anyone explain Laravel 5.2 Multi Auth with example
https://laracasts.com/discuss/channels/laravel/52-auth-multiple-tables?page=1
QUESTION
How I do I implement multiple authentication in laravel 5.3. There is a package I used in laravel 5.2 called "sarav/laravel-multiauth" but according to the vendor, it does'nt work for 5.3. Is there any similar package i can easily use to implement multi auth where i can have admin and user guard() with different models?
...ANSWER
Answered 2017-Jan-11 at 04:51I finally used sonars/multi-auth and i got exactly what I wanted
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install laravel-multiauth
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page