PHPackages                             amerald/eloquent-toolkit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. amerald/eloquent-toolkit

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

amerald/eloquent-toolkit
========================

Brings attributes validation and other cool features to Eloquent

021PHP

Since Feb 10Pushed 5y agoCompare

[ Source](https://github.com/ameraldcraft/eloquent-toolkit)[ Packagist](https://packagist.org/packages/amerald/eloquent-toolkit)[ RSS](/packages/amerald-eloquent-toolkit/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Eloquent Toolkit
================

[](#eloquent-toolkit)

Enjoy Eloquent attributes validation and other cool features.

Installation
------------

[](#installation)

```
composer require amerald/eloquent-toolkit

```

Usage
-----

[](#usage)

### Attributes Validation

[](#attributes-validation)

Laravel's validation is amazing. Though, it is not always the case that the validated data will get unchanged to an Eloquent model: we may need to transform it in one way or another, or even compose a model from several data sources.

Wouldn't it be great if we could validate model attributes in a similar way we do with function arguments? Specify whether an attribute is required along with its type(s)?

```
