06 - "Strict" Services: Interfaces, Injection, Strategy Pattern
After looking at Services, let's look at a Service example that gets us closer to the "classical" design patterns. It's an example from our previous lesson
We found 11 results for "interfaces".
After looking at Services, let's look at a Service example that gets us closer to the "classical" design patterns. It's an example from our previous lesson
Interfaces are one of the most confusing topics in OOP with Laravel. When/how specifically should they be used? Let's take a look at two examples.
I will show you 3 examples of Laravel packages that have the same pattern of interface + trait used together. How does it work, and how can you use it in your projects?
When do you need to create interfaces in PHP/Laravel? Suppose you have a method with different implementations depending on some condition. In that case, it may be a candidate for an interface, with different classes implementing that interface method differently, depending on that condition. Let me show an example.
Files in the example:
Files in the example:
Files in the example:
Files in the example:
Files in the example:
Files in the example: