Registry / orm / laravelbook-ardent

laravelbook-ardent

JSON →
library3.6.0phppackagistunverified

Self-validating smart models for Laravel 5's Eloquent ORM.

composer require laravelbook/ardent
INSTALL
IMPORT
SIG · LARAVELBOOK-ARDENT
L
laravelbook-ardent
ormphpv3.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Ardent
use LaravelBook\Ardent\Ardent;

Create self-validating Eloquent models with automatic validation.

<?php require 'vendor/autoload.php'; use LaravelBook\Ardent\Ardent; class User extends Ardent { protected $fillable = ['name', 'email']; public static $rules = [ 'name' => 'required', 'email' => 'required|email' ]; } $user = new User(['name' => 'John']); if ($user->save()) { echo 'Saved!'; } else { echo implode(', ', $user->errors()->all()); }
Debug
Known issues
breakingDesigned for Laravel 5; may not work with Laravel 6+ without modifications.
fix
Check compatibility with your Laravel version or use Laravel's built-in validation.
affects: >=3.0.0
Upgrade
Version history
3.6.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
27 hits · last 30 days
node
26
Resources
laravelbook-ardent — pip install laravelbook-ardent · libregistry