Support the ongoing development of Laravel.io →
Eloquent Forms
Last updated 1 year ago.
0

so an employee has one address? then your model is correct.

if employee has multiple addresses then remove the address id from employee table and add an employee id to the address table, then simply define has many relationship on the employee table and a has one relationship on the address table.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

AasirR aasirr Joined 8 Nov 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.