We’re here again for another design pattern example! This pattern lets you add new features or behaviours to existing classes without modifying the main class.

Imagine we are building a CRM and we are required to add logging functionality into our application.

Another when a user logs in to the application, we are required to log it into a file and into a database log table.

We only have to set it up in our “service container” the correct instantiation of decorators!
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners