ardent
ardent copied to clipboard
Self-validating, secure and smart models for Laravel's Eloquent ORM
There will be soon some mix between `array()` and `[]`. To avoid this, when updating to Laravel 5, we could update the array syntax as well.
Broken link on git hub pages, this page: http://laravelbook.github.io/ardent/ Bad link goes to: http://doc.laravelbook.com/validation/#working-with-error-messages
I have the following method in my model: ``` php public function afterValidate() { if(!$this->is_staff && $this->is_preview_user) { $this->validationErrors->add('is_preview_user', 'Only staff can be preview users'); return false; } return true;...
after writing model i write rules following $rules = array( 'title' => 'required|', // password can only be alphanumeric and has to be greater than 3 characters 'image' => 'mimes:jpeg,bmp,png,gif|required',...
With pivot
Hi, can somebody explain how https://github.com/laravelbook/ardent#cleaner-definition-of-relationships--since-20 works with pivot? e.g. eloquent model relation function: ``` php public function attributes () { return $this->belongsToMany('Attribute', collectionAttribute_collection', 'id_collection', 'id_collectionAttribute')->withPivot('value'); } ``` now with...
http://laravel.com/docs/4.2/eloquent#has-many-through This relationship seems to be missing from Ardent.
How would I validate that a boolean input (a checkbox for example) is true, but not store its value in the database?
Is there a preferred or built-in way of combating spam comments when validating forms with Ardent? I've tried to use https://github.com/msurguy/Honeypot with the valdation rules in my model and the...
It seems that _updateUniques_ creates validation rules before _beforeValidate_ has the chance to modify the static rules. If I use the classic _save_, my custom rules are added to the...
How can I forceCreate ardent? I am doing some kind of seeding, and using: ``` $user->create([]); ``` But how can I tell ardent to ignore validation?