Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Problem with model and auth #682
Hello, im have a bit problem with the models and modules.
I have a model User with more functions than User model original.
When i use Auth()->User for get user model, i retrieve the user model global of laravel, i cant call functions of the User model of the module.
Now i use this: \Modules\Chat\User::where('id', Auth()->User()->id)->first() to get the user, but this generate a extra sql query.
you know other form to realize this?
Hi, but when i use Auth::user() this already fetch the user with user model original.
I will like use user from module in auth::user(), i know about eager load, but i cant use that with auth::user for load another user from same table.
If not, I will forget this problem xD
a regards and thx!