Closed gofish543 closed 4 years ago
Additionally, I need a better way to apply the afterGates
callback as the way I do it now feels like a janky solution rather than a good one.
If I don't do what is currently there though, each call to new PendingFormRequest() will result in another afterGates
callback being applied.
@gofish543 Did you come up with a solution. I'm in a situation where on an UpdateRequest I need access to a route for updating a model and inside the UpdateRequest I do the following Rule::unique('table')->ignore($this->route('model')->id)]
so I need to create a value for this param so that when I unit test the request class it will see it.
Let me know your thoughts on this concept. I like the form creation, withUser, and expects gates.
I want to be able to do something like validateOn(...) and pass the data in, and list the items I expect to fail / pass, but I'm not sold yet on my implementation. Thoughts?
Usage
code