laravel-users
laravel-users copied to clipboard
Custom Users Model (not being honored?)
I am using a user model with a custom table named defined:

However when doing something like adding a new user, an error is thrown. The error seems to be spitting back the '.users' table which makes me think some kind of default is not being overridden. Is this the case? How can I fix this (while keeping my custom user table)?
Thanks!
The users table is not defined in this package it all funs off the config file var:
https://github.com/jeremykenedy/laravel-users/blob/master/src/config/laravelusers.php#L39
Which is used in:
https://github.com/jeremykenedy/laravel-users/blob/master/src/App/Http/Controllers/UsersManagementController.php
by calling config('laravelusers.defaultUserModel').
You may need to clear composer and the config of your app.
Despite clearing all forms of cache and even bouncing my apache server, I am still getting the following:

Mind you, I have also specified the specific user model in the config file. I am at a loss.
What line does it say it fails on with that stack trace in the laravel.log
This issue is in the controller rules I believe.
I am not sure when I will have time to fix it but its the rules I think in these lines:
- https://github.com/jeremykenedy/laravel-users/blob/master/src/App/Http/Controllers/UsersManagementController.php#L94
- https://github.com/jeremykenedy/laravel-users/blob/master/src/App/Http/Controllers/UsersManagementController.php#L95
- https://github.com/jeremykenedy/laravel-users/blob/master/src/App/Http/Controllers/UsersManagementController.php#L203
The issue is it calling the unique:users on those lines.
I'm handed a bunch of things... I'm not sure if this will be helpful:


Oddly, in the debug pane, it shows a query that seems correct:

You're right... I did some see some validator flags get raised. Thanks for maybe confirming that being the case... I can try to sidestep that and see what happens (when I have a moment later tonight). Will keep you posted.
Great success. Stripping out the |unique:users solved the issue.
Thanks for your help on this (and of course all the other work you've done)!