middleware = array_merge( $this->middleware, [ ResolveBindableArgs::class, ], ); parent::__construct($nullable, $isList); } /** * @return array */ public function attributes(): array { return [ ...parent::attributes(), 'model' => $this->model(), ]; } /** * Get the model related to the query. * * @return class-string * * @throws RuntimeException */ public function model(): string { $baseType = $this->baseType(); if ($baseType instanceof EloquentType) { return $baseType->model(); } throw new RuntimeException(sprintf('The base return rebing type must be an instance of EloquentType, %s given.', $baseType::class)); } protected function query(Builder $builder, array $args): Builder { return $builder; } }