isMethod('get')) { return []; } return [ 'username' => 'required|string|unique:staff,username', 'role_id' => 'required|numeric', 'password' => 'required|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'); } }