public function valid() { if (empty($this->rules)) { return true; } $v = Validator::make($this->attributes, $this->rules); return $v->passes(); }