Repeatable field not triggering actions like created/updated (Observer) #1108
Replies: 1 comment
-
I managed to sort it out myself. I had to change model of my service_order_products table from "Model" to "Pivot". Also I had to do a change in ServiceOrder.php model. I forgot to add "using" ServiceOrder.php
ServiceOrderProduct.php
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Iam trying to implement Observer.
I have a repeatable field for products. Relationship in model is created like that:
I have registered observer in AppServiceProvider:
ServiceOrderProduct::observe(ServiceOrderProductsObserver::class);
It works when I manually create/update ServiceOrderProduct table record thru tinker. But it does not work when it adds new items thru repeatable field.
Any idea how to handle that?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions