title: (Laravel) How can I get validation errors from User model?
body: <p>I'm trying to register a user in my application while keeping all business logic in the model and as little as possible in the controller. To accomplish this, I'm running user validation in the model's <code>boot()</code> method when the <code>Class::creating()</code> event fires. If the validation fails, I simply return false, cancelling the event. You can see this here:</p>
  
  <pre><code>public static function boot() {
      parent::boot();
      User::creating(function(){
          $validator = new Services\Validators\RUser;
          if (! $validator-&gt;passes()) return false;
      });
  }
  </code></pre>
  
  <p>The validator class you see is simply rules and it contains a <code>getErrors()</code> function.</p>
  
  <p>My question is, how can I rewrite this so that I can retrieve the validator's errors for use in a conditional redirect later?</p>
  
  <p>My controller <code>postRegister()</code> (the function called when clicking submit on form) looks like this:</p>
  
  <pre><code>public function postRegister() {
      $user = new User(Input::all());
      $user-&gt;save();
  }
  </code></pre>
  
  <p>I know I'm <strong>not</strong> handling that in the controller correctly, so I would appreciate some advice with that as well.</p>
  
  <p>Thanks.</p>