Tightly Coupled vs Loosely Coupled Classes in PHP
When building PHP applications, understanding coupling is crucial for maintainable and flexible code. Let’s break it down.
When building PHP applications, understanding coupling is crucial for maintainable and flexible code. Let’s break it down.
The Dependency Injection Container is the tool that makes objects ready to pass by automatically creating them and their required dependencies.
Here’s a step-by-step breakdown of the flow you described, represented as a diagrammatic explanation:
If you’re learning Object-Oriented PHP, a great way to practice is by building something small and meaningful.
This guide will help you quickly revise PHP basics, OOP concepts, MVC, Composer, and modern best practices.
Group middleware is a way to bundle multiple middleware under one group name, so you don’t have to manually list every single middleware for every route.
Middlewares are filters for HTTP requests. It filters the request using it’s parameters and redirect to different routes. If all filters passes then call the final controller.
When you’re learning PHP, one confusing thing that often pops up is the term “Closure”. Any anonymous fn() is always an object of default php Closure class.
Creating your own MVC (Model-View-Controller) structure in plain PHP without any frameworks or Composer packages can be a great way to learn how things work behind the scenes. But it…
Bootstrap provides pre-designed components/classes while Tailwind CSS provides lots of low-level utility classes gives you more flexibility.