Skip to content
Discussion options

You must be logged in to vote

Hey @realtebo!
I'm not sure in which part of the code you are, but I believe you can use the request() at any place.
So most probably, if you want to intercept a request to manipulate data you can use the event saving (that gets called before any save, create/update) and there you can access the request() data.

Also, if you just want to manipulate data on your model before save, most probably you need a mutator.
Take a look here; https://laravel.com/docs/10.x/eloquent-mutators#defining-a-mutator

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@pxpm
Comment options

pxpm Aug 9, 2023
Maintainer

Answer selected by realtebo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants