demo
demo copied to clipboard
Morphto relation setup with examples in demo
Hi there!
Could you please provide us with more info about this? Looks like you skipped the title/body.
Thank you!
-- Justin Case The Backpack Robot
$this->crud->addField([
'name' => 'commentable',
'morphOptions' => [
['App\Models\PetShop\Owner', 'Owners'],
['monster', 'Monsters', [
'placeholder' => 'Select a little monster'
]],
['App\Models\PetShop\Pet', 'Pets', [
'data_source' => backpack_url('pet-shop/comment/fetch/pets'),
'minimum_input_length' => 2,
'placeholder' => 'select a fluffy pet'
]],
],
]);
Just pasting it here as the PR contains only the fluent way.
Hi @pxpm super great job Pedro, look perfect and work perfect is like magic!
I can achieved list all morph relation here

On edit everything work as expected

And i add new relation to Articles and works perfect!

Super great job.
Cheers