FileUpload doesn't accept MorphTo.

This is the product model:
    public function photo(): MorphOne
    {
        return $this->morphOne(Photo::class, 'photoable');
    }


This is the photo model:
    public function photoable(): MorphTo
    {
        return $this->morphTo();
    }


This is the resource:
                FileUpload::make('photo')
                    ->image()
                    ->placeholder(__('Photo')),


When I upload then the photo table is empty.
Was this page helpful?