isMethod('get')) { return []; } return [ 'username' => 'required|string|unique:staff,username,'.$this->staff->id, 'role_id' => 'numeric', 'password' => 'nullable|min:6', ]; } /** * @return string */ public function getUsername(): string { return (string) $this->get('username'); } /** * @return int */ public function getRoleId(): int { return (int) $this->get('role_id'); } public function getPassword(): string { return (string) $this->get('password'); } }