diff --git a/src/Fields/BelongsTo.php b/src/Fields/BelongsTo.php index 4fd871e0..59f40695 100644 --- a/src/Fields/BelongsTo.php +++ b/src/Fields/BelongsTo.php @@ -5,6 +5,7 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo as EloquentRelation; use Illuminate\Http\Request; +use Illuminate\Routing\Router; class BelongsTo extends Relation { @@ -29,4 +30,28 @@ public function resolveHydrate(Request $request, Model $model, mixed $value): vo parent::resolveHydrate($request, $model, $value); } + + /** + * {@inheritdoc} + */ + public function asSubResource(bool $value = true): static + { + return $this; + } + + /** + * {@inheritdoc} + */ + public function isSubResource(): bool + { + return false; + } + + /** + * {@inheritdoc} + */ + public function routes(Router $router): void + { + // + } }