juniorfontenele/laravel-contracts

Set of Laravel Contracts

dev-master 2025-05-29 13:35 UTC

This package is auto-updated.

Last update: 2025-05-29 13:35:55 UTC


README

Latest Version Total Downloads

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.