null, "first_name" => null, "last_name" => null, "cliente_id" => null, "status" => null, "status_message" => null, 'active' => null, "last_active" => null, "created_at" => null, "updated_at" => null, "deleted_at" => null, ]; protected $casts = [ "id" => "int", "cliente_id" => "int", "active" => "boolean", ]; /** * Returns a full name: "first last" * * @return string */ public function getFullName() { $fullName = (!empty($this->attributes["first_name"]) ? trim($this->attributes["first_name"]) . " " : "") . (!empty($this->attributes["last_name"]) ? trim($this->attributes["last_name"]) : ""); $name = empty($fullName) ? $this->attributes["username"] : $fullName; return $name; } /** * Alias for getFullName() * * @return string */ public function fullName() { return $this->getFullName(); } }