0

How can i set custom Auth::user()->***? I have 2 tables, table 'users' and table 'roles', When it executes the SQL it returns the parameters, but i want to add custom parameters with INNER JOIN from the table 'roles' so i can have Auth::user()->role, Auth::user()->prefix, etc...

So, more simply:

I have table 'users' and table 'roles' Laravel auth only takes parameters from the users table I want that it uses a INNER JOIN so it takes parameters from roles table too

I tried a SQL like this (SELECT users.*, roles.prefix, roles.color FROM users INNER JOIN roles ON users.roleId = roles.roleId WHERE users.id = 1;) and works, but how can i do the same thing with laravel auth?

0 Answers0