petritr
4 months ago
219
1
Laravel

Laravel Model Observers & Relations

Posted 4 months ago by petritr

Is it a good price to use Observers to check when an relationship HasMany is created? My goal is to know when an relationship is created so i can check the other Model and update it with the relation data.

I want to Observe when Users has and Job Relation created, with the Job data i can check if Position Model has this new Job

Any suggestions ?

Please sign in or create an account to participate in this conversation.