Currently I have two tables; Users and Employees
All users are employees but not all employees are users,
I have a models Users
and Employee
, the personal details of a user are pulled his respective employee record.
Now I wanted to display all users and I can do it using User::all();
but also I wanted to have their personal details too.
currently I'm doing a DB::
call to join table in a function on my Users Model.
is there a better approach to this?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2rBMmJa
via IFTTT
Aucun commentaire:
Enregistrer un commentaire