Exemplo n.º 1
0
 public function __construct($options = null)
 {
     //it's not associative, so this means the options is the list
     if (array_keys($options) === range(0, count($options) - 1)) {
         $options = array('list' => $options);
     }
     parent::__construct($options);
 }
Exemplo n.º 2
0
 /**
  * Constructor takes a single value and not an array. It will set the 'equals' options
  * to this value.
  */
 public function __construct($options = null)
 {
     //not an array, so we assume $options is the token
     if (!is_array($options)) {
         $options = array('token' => $options);
     }
     parent::__construct($options);
 }
Exemplo n.º 3
0
 public function __construct($data)
 {
     $this->rules = array('email' => 'required|email|unique:customers');
     parent::__construct($data);
 }
Exemplo n.º 4
0
 public function __construct($data)
 {
     $this->rules = array('quantity' => 'required|integer|min:1', 'amount' => 'required|numeric|min:0', 'postage' => 'required|numeric|min:0');
     parent::__construct($data);
 }