colbyr / aware

self-validating models for Laravel\Eloquent

Home Page:http://bundles.laravel.com/bundle/aware

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rules and messages must be static

cviebrock opened this issue · comments

The code you have in the read me:

public $rules = array(
  'name' => 'required',
  'email' => 'required|email'
);

generates an error:

Cannot redeclare static Aware::$rules as non static User::$rules

You need to update the docs to show:

public static $rules = array(
  ...
);

Same goes for $messages.

Thanks for the heads up!