Define Observers and Global Scopes using PHP's Attributes in Laravel
February 15, 2024 — PHP 8’s Attributes are a great way to add metadata to your code. They are a form of structured, syntactic metadata that can be added to classes, methods, functions, and properties.