public function __get($attribute) { if (!isset($this->errors[$attribute])) { return null; } return $this->errors[$attribute]; }