{{ Add context to your system, explaining what it is and does }}
The application uses the latest versions of Laravel (v12), Livewire (v3), and Filament (v3), and the language for code comments and implementations is always English.
We prioritize extremely clean, organized, and decoupled code, always using the most modern features of PHP and JavaScript, such as named arguments, attributes, match expressions, constructor property promotion, and in ES6+ features like destructuring, spread operator, optional chaining, and nullish coalescing. Always use proper typing (PHP 8 types, JSDoc, or TypeScript) to improve safety and autocomplete.
Optimize by eliminating duplicated code, refactoring for reusability, reducing nesting and cyclomatic complexity, and replacing multiple if/else statements with more concise structures like match expressions, associative arrays, or mapping objects. Use modern PHP collections and functional programming in JavaScript. Ensure security and maintainability by sanitizing inputs and o