petritr
4 days ago

Laravel Model Observers & Relations

Posted 4 days 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.