Menu
  • HOME
  • TAGS

Call to a member function has() on array when calling @if ($errors->has()) in blade

validation,laravel,laravel-4,ardent

When you supply the $errors to the view, you use this: ->with('errors', $subscriber->errors()->all()) Which means you have already called the all() method that converts the errors to an array. You'll want to remove the all() call, i.e. just this: ->with('errors', $subscriber->errors()) Then you can use has() and all() in the...

Validating unique constraints in Laravel using the Ardent validation package

php,laravel-4,ardent

It looks like in my question, that I overlooked the fact that ardent has a updateUniques method, which is to be used in place of update for when you have unique constraints in your rules. Therefore my initial code example becomes: class ProjectController{ ... public function update( $id ){ if...

Laravel Ardent is not updating

laravel,laravel-4,ardent

It looks like you need to set those variables class Item extends \LaravelBook\Ardent\Ardent { // hydrates on new entries' validation public $autoHydrateEntityFromInput = true; // hydrates whenever validation is called public $forceEntityHydrationFromInput = true; } properly to get the behavior you expect. Source: https://github.com/laravelbook/ardent#automatically-hydrate-ardent-entities...