I want to implement a custom interface for a Laravel service. In which place in the Laravel folder structure would it be best to store the implementation?
Advertisement
Answer
Basically, it doesn’t matter where you create the corresponding interface. Everyone has to decide for themselves. If you need an interface for several areas (facade, controller, helper) then it might make sense to store the interface in the Facades folder.
Another possibility would be to create a folder Interfaces under app/ and store all interfaces there. As @lagbox had already suggested.
Conclusion: It always depends on the case and how you like it.