Questions tagged [ardent]

Ardent is a package that provides self-validating smart models for the Laravel framework's Eloquent O/RM.

Ardent provides self-validating smart models for Laravel Framework 4's Eloquent O/RM, based on the Aware bundle for Laravel 3. With it, Laravel validation rules can be inserted into the model's class as a tag variable. At save, the model will validate itself and modify the database or in faliure it gives error messages.

Installation

Add laravelbook/ardent as a requirement to composer.json:

{
    "require": {
        "laravelbook/ardent": "dev-master"
    }
}

Update the packages with composer update or install with composer install.

Useful links

57 questions
1
vote
2 answers

updating one attribute fails by validation laravel 4

I have an Ardent (Laravel 4) model with validation rules as below: public static $rules = array( 'title' => 'required|alpha_num|min:4', 'friendly' => 'required|alpha_num|url' ); When I try this: $page =…
Yunus Is
  • 11
  • 3
1
vote
4 answers

Laravel Ardent not letting me save my User

I started a project last night in Laravel and am using Ardent and Entrust packages to help make my User model more secure and easy to use. I have set everything up but am not able to seed my database. No errors are thrown but it is definitely not…
searsaw
  • 3,492
  • 24
  • 31
0
votes
1 answer

laravelbook/ardent 3.6.0 not getting installed in Laravel 7.15.0

I have one Laravel 4.2 project which uses laravelbook/ardent and needs to updated to newest Laravel Version. But the problem is that laravelbook/ardent doesn't get installed and giving following error upon installation. Now I don't know how to deal…
Alpesh Trivedi
  • 944
  • 2
  • 13
  • 33
0
votes
2 answers

Extending Ardent from jenssegers/laravel-mongodb

How do I get Ardent to extend from jenssegers/laravel-mongodb without editing the Ardent.php and replacing the use Illuminate\Database\Eloquent\Model; statement?? Any clean way to achieve this?
0
votes
1 answer

Laravel Administrator package relationship error

My Ardent model has a has_one relationship like this public static $relationsData = array( 'organization' => array(self::HAS_ONE, 'Organization', 'foreignKey' => 'party_id'), ); Now, my Laravel Administrator package's model config file have column…
Vishwajeet Vatharkar
  • 1,146
  • 4
  • 18
  • 42
0
votes
1 answer

Confide custom validator

I am using confide for user authentication. I wanna use custom rules using laravel's Validator (for firstname and lastname) class as in $validator = Validator::make($user, $this->rules[$ruleset]); and check with $validator->passes(). How can I…
Bishal Paudel
  • 1,896
  • 2
  • 21
  • 28
0
votes
1 answer

Custom attribute name in Ardent validation message

I'm using Ardent in my Laravel project because I love its awesome model validation feature. Now I need to set human understandable attribute values in the validation error messages. I read that it can be accomplished by setting the $attributes…
Fabrizio D'Ammassa
  • 4,729
  • 25
  • 32
0
votes
1 answer

Laravel AutoHydrate Ardent Model, but sometimes manually assign?

So I have my Model setup like this: protected $fillable = array('dragon_id', 'name', 'gender'); public $autoHydrateEntityFromInput = true; // hydrates on new entries' validation public $forceEntityHydrationFromInput = true; // hydrates whenever…
HaleyBuggs
  • 915
  • 3
  • 13
  • 29
0
votes
1 answer

keep saying The password field is required

I'm having trouble with a form from laravel to create a user. It keeps on saying "The password field is required". I checked the post and the password is filled. I'm using ardent and have this at the beginning of my user model: public static…
Graham
  • 1,850
  • 4
  • 21
  • 41
0
votes
1 answer

How to validate a form field but not store it in the database

I have a form with a checkbox field for users to accept terms and conditions. currently if validation passes all the fields will be stored in the database. I tried to exclude this field by setting the input variable: $input =…
Jeremy Plack
  • 487
  • 1
  • 6
  • 16
0
votes
1 answer

Laravel & Ardent - orderBy in $relationsData

In Eloquent, you can do this: public function children() { return $this->hasMany('page'); } And in Ardent, you can do this: public static $relationsData = [ 'children' => [self::HAS_MANY, 'Page'], ]; In Eloquent, you can also do…
Joe
  • 15,669
  • 4
  • 48
  • 83
0
votes
1 answer

Laravel Ardent is not updating

I'm trying to submit updates to items in the Items model. However, Ardent never actually performs the updates when the update method receives them but doesn't throw an error: public function update($id) { $item = Item::findOrFail($id); if…
eComEvo
  • 11,669
  • 26
  • 89
  • 145
0
votes
2 answers

Allowed memory size exhausted on Laravel Ardent

I got this error when saving with a file on input. The file is uploaded but I got this in saving process. Allowed memory size of 134217728 bytes exhausted (tried to allocate 94 bytes) in…
lukaserat
  • 4,768
  • 1
  • 25
  • 36
0
votes
1 answer

Laravel Confide ( Ardent )password confirmation works on save but not on update

I know there are many questions about something similar, but I couldn't apply any solution to my problem. I'm using Laravel with Confide, which uses Ardent to validate. I don't have any problem saving users, password_confirmation is removed when…
Cmorales
  • 958
  • 1
  • 9
  • 24
0
votes
1 answer

Laravel Updating a record

I'm having troubles updating a record. I have a page where users can register, this works flawlessly and has 4 fields: email, username, password and confirm password. This is a simple registration page and I dont want to turn off the visitors by…
AnsellC
  • 795
  • 3
  • 9
  • 17