Closed yurikoster1 closed 2 years ago
@yurikoster1, curious when you would use an interface for a form request. Unless it were bound to a concrete form request, the validation would not work.
I use it when versioning an API by extending the controller class from the previous version, using an interface allows me to have a different form request bound to the same method on both versions of the controller. Then on the constructor of both controllers I bind the interface to the correct concrete class.
Allows the assertion assertActionUsesFormRequest to pass when the action in the controller uses an Interface instead of a concrete method