schema; } /** * Prepare the data for validation. * * @return void */ protected function prepareForValidation(): void { parent::prepareForValidation(); $controller = $this->route()->getController(); if (! $controller instanceof InteractsWithSchema) { throw new RuntimeException("Cannot resolve schema for controller '{$this->route()->getControllerClass()}'"); } $this->schema = $controller->schema(); } }