Skip to content
Advertisement

Tag: interface

PHP/Laravel FormRequests Types

I have a doubt about the FormRequest Class (I think it apply at other classes). I have a class which has a method init(). This method receive a VehicleRequest. I’m going to share a simplified version of the code: The class Car: The request I send (in car case) looks like: Now, in this example a Car class is initialized

PHP Interface: Specify ANY visibility

I’m making use of an interface for a set of classes. I have a problem however because I wish for any visibility to be allowed in the interface (That is: public, protected and private). I need the parent method to only be protected and I need the child method to be private, but I get the error saying Fatal error:

Advertisement