There is a feature in laravel which allows you to inject into the route model instances. Previously, you would have had to pass the ID of the model that you wanted to work with in the request and then you would write all the business logic yourself and validate the Models ID.
Dependency Inversion states that high level modules should not depend upon low level modules. Instead, they should depend on abstractions and not concretions.
The letter I in SOLID stands for the interface segregation principle. The principle states that a client should not be forced to implement an interface that it doesn’t use.
There are two new helper function in Laravel 9. the first one is str() which cretes a stringable object and the aother is to_route() which allows you to redirect to a named route.
All of the migration stubs do not have the traditional class names. Previous versions of laravel, the migration file was setup with the class name
New to laravel 9 Controller Route Grouping
The Liskov Substitution principle states that derived classes must be substitutable for their base classes. Meaning, every time you prepare a subclass, that subclass should be substituable in every place where the original class was accepted.
The O in SOLID represents the open-closed principle which states that entities should be open for extension but closed for modifications.
A class should only have one responsibility and have only one reason to change.
For the vast majority of developers, writing unit tests were short bits of throw away code. They would write some code just to verify that their programs worked. Classes and methods would be written and then some adhox code would […]