juniorfontenele / laravel-contracts
Set of Laravel Contracts
dev-master
2025-05-29 13:35 UTC
Requires
- php: ^8.3
- illuminate/contracts: ^12.0
- illuminate/validation: ^12.0
Requires (Dev)
- driftingly/rector-laravel: ^2.0
- larastan/larastan: ^3.4
- laravel/framework: ^12
- laravel/pint: ^1.22
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- rector/rector: ^2.0
This package is auto-updated.
Last update: 2025-05-29 13:35:55 UTC
README
A set of reusable contracts (interfaces) for Laravel projects, designed to standardize and simplify the implementation of common patterns such as validation, filtering, and data transformation.
Features
- Validation Contracts: Define how data should be validated in a consistent way.
- Filter Contracts: Standardize query filtering logic.
- Data Contracts: Ensure data objects can be easily converted to and from arrays.
Installation
composer require juniorfontenele/laravel-contracts
Usage
Implement the provided interfaces in your classes to enforce consistent structure and behavior.
Example:
use JuniorFontenele\LaravelContracts\Validation\Validatable; class MyRequest implements Validatable { // Implement required methods: validate(), rules(), messages(), attributes() }
License
MIT License. See LICENSE for details.