I have polymorphic relations
class ActionItems extends Model
{
use HasFactory;
use AsSource;
use Filterable;
public function actionable(){
return $this->morphTo();
}
}
And
public function actionable(){
return $this->morphOne(Action::class,'actionable');
}
How I make form for polymorphing relations?
I find this code:
Relation::morphMap([
'image' => Image::class,
'post' => Post::class,
]);
https://laravel-news.com/enforcing-morph-maps-in-laravel
and is not work.