Laravel 6 Advanced
It would only be fitting that cover one of the most fundamental advanced concepts in Laravel as a first episode. The service container is primary building block of any Laravel Application
View Composers come in very handy for "automatically" attaching data to views. This allows you to pull in views without worrying about proving the necessary data to make it work. Let's explore an example of it using the idea of Channels.
Polymorphism is just a fancy word for the concept that objects can take different shapes as long as they follow the same interface. In this episode, we are exploring One To One (Polymorphic) relationships, One To Many (Polymorphic) relationships and Many to Many (Polymorphic) relationships by example.
Buckle up because in this episode we are tackling the mysterious inner workings of the Facades feature in Laravel. Certainly, the most debated of all Laravel features and what better way than to implement our very own Facade feature from scratch!
Up next, let's talk about the easiest way to add functionality to the core of Laravel using Macros. Macros allow you to add functions to many of the built in classes in Laravel using a Service Provider or a dedicated class. Let's dive in and figure it out.
Pipeline is a design pattern specifically optimized to handle stepped changes to an object. Think of an assembly line, where each step is a pipe and by the end of the line, you have your transformed object. Let's implement a filtering functionality using the pipeline pattern and Laravel.
The Repository Pattern is a common refactor that you may encounter in large Laravel applications. While it is not ideal for small to medium projects, it's a perfect solution for those applications that need an abstraction of the data layer.
Lazy Collections & PHP Generator
Let's take the covers off of Laravel's brand new feature of Lazy Collections and dive deep implementing our very own generators from scratch. Buckle up, it's going to be a mind bending road.
At times, you need your application to keep records in the database but still make them disappear from functionality. That's where soft deletes come into play. They allow you to complete hide a record from the database without actually deleting the record. Let's take a look at an example.