Accessing $request vars in observer
So I ran into this problem multiple times but always changed it differently. I'm now posting this hoping there is an easier solution. Sometimes I use fields in my form (for recurring event for example) that I don't need saved in the database.
If I don't specify the fields in the fillable array (on the model) then they don't appear in the observer:
I know i should maybe do this with a:
->mutateFormDataUsing()
But I would have to do that at multiple places (in the resource and livewire page with fullcalendar for example), and personally I love putting this logic in an observer so I always know where to look.
So my question: how can I access $_POST vars (or $request->inputs) in an observer? Without adding them as a fillable field?
If I don't specify the fields in the fillable array (on the model) then they don't appear in the observer:
I know i should maybe do this with a:
->mutateFormDataUsing()
But I would have to do that at multiple places (in the resource and livewire page with fullcalendar for example), and personally I love putting this logic in an observer so I always know where to look.
So my question: how can I access $_POST vars (or $request->inputs) in an observer? Without adding them as a fillable field?