-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to create seperate user_admin table? #2568
Comments
Did you check the database? Was your user created in the correct table? Assuming it populated your |
Oh I see. I had to do change VoyagaerUser as default model for the default guard and set up a different guard for my app. Thank you, that worked. |
@fletch3555 I just realized that while my login with Voyager works, the default user of my application can't login anymore. I created a second guard called
If I try to call this LoginController via |
Whoups... I figured it out, its because
I have to change the guest middleware to
|
Hey @iwasherefirst2 I realize this isn't Laravel support, but I'm attempting to replicate your results and despite reading Laravel docs repeatedly, I can't seem to get this working. Would you mind posting some of what you did here to add and enable the alternate guard? |
@mandofever78 sure thing. So as explained above I created an
Next I had to set the
Let me know if you have any more questions |
That is exactly what I needed to get it working! Thanks for the quick response. I appreciate you taking time to explain. For others out there doing the same with an existing (and possibly conflicting) database, you may need to update a few tables after voyager:install (and before creating a new voyager admin) with this method. I had to do the following: -manually ran migration from add_voyager_user_fields to add role_id and avatar to voyager_user table as this was not done during install |
@iwasherefirst2 |
This has been closed for 11 months now and was for an older version. Please open your own issue or ask in our slack group |
I want to have users and admin_users in two separate tables.
I found that this has been asked before at #2354 and at #934 but both threads did not work out for me.
This is what I have done:
php artisan make:mode VoyagerAdmin -m
Renamed 'users' to 'voyager_users' in
/database/migrations/****_**_**_*****_add_voyager_user_fields.php
I can create a new user with
php artisan voyager:admin your@email.com --create
However, I cannot login with that. I get the error message that these login credentials could not be found in the database.
Have I done anything wrong?
The text was updated successfully, but these errors were encountered: