get("user") || (int)$this->get("user") === $this->user()->id || $this->user()->can("createOnBehalfOfEmployee", VacationRequest::class); } public function rules(): array { return [ "user" => ["nullable", "exists:users,id"], "from_date" => ["nullable", "date_format:Y-m-d"], ]; } public function data(): array { return [ "user" => (int)$this->get("user"), "from_date" => $this->get("from_date"), ]; } }