Abstraction: Hiding complex implementation details and showing only the essential features. A TV remote abstracts all the electronics — you just press the button. Abstraction means hiding complicated details behind a simple interface. You use a remote control without knowing anything about infrared signals, and code can call sendInvoice($order) without knowing how PDFs are built or emails are sent.
Good abstractions let you think about one level at a time. The code that handles orders deals with orders, not with SMTP servers. That makes it easier to read, test and change.
What should you keep in mind with Abstraction?
The risk is abstracting too early. An interface with one implementation, or a base class built for a future that never comes, adds layers without adding value. A useful rule is to wait until you have two or three real cases that share a shape. Then the right abstraction is usually obvious, and you build it around what the code actually needs.
Apply Spatie's Laravel and PHP coding standards for any task that creates, edits, reviews, refactors, or formats Laravel/PHP code or Blade templates; use for controllers, Eloquent models, routes, config, validation, migrations, tests, and related files to align with Laravel conventions and PSR-12.
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or when debugging dependency cycles between application layers.