morphTo relationship
In model
public function image(){ return $this->morphTo(Image::class, 'imageable')->where('position_slug', 'logo'); }
in filament resources
Fieldset::make('Metadata')
->relationship('image')
->schema([
FileUpload::make('image')->image(),
])
but it's not uploading image in relationship model. and my relational table is in given screenshot.
public function image(){ return $this->morphTo(Image::class, 'imageable')->where('position_slug', 'logo'); }
in filament resources
Fieldset::make('Metadata')
->relationship('image')
->schema([
FileUpload::make('image')->image(),
])
but it's not uploading image in relationship model. and my relational table is in given screenshot.