Help with relationship field type - inline_create array #717
Replies: 1 comment 3 replies
-
That
Not the case here. "entity" there means the "route entity" that we are going to use. Imagine you have a CRUD::field('tags')->inline_create(['entity' => 'tag']); This means that you want the Can you post a screenshot of the error your are getting ? I am guessing is some messup with entity names/routes. Apart from the general Operation Docs, there is also this small snippet with useful information. Cheers |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there,
I'm in the process of implementing Backpack CRUD for client's custom needs, and I've come to some difficulties trying to implement InlineCreateOperation (https://backpackforlaravel.com/docs/6.x/crud-operation-inline-create)
I have these scheme of Models:
As you can see, I tried for you to show, that nested logic which I work with, I have multiple Instances, with HasMany InstanceVersions, and every InstanceVersion HasMany InstanceVersionDebts.
I want
select2 multiple field
, to select InstanceVersionDebts, which I will create in Modal, and have that+ Add
link on top right position of my select2 field. Currently it drives me crazy, because for some hours which I put in I still can't achieve that - that little+ Add
thing.I would be really glad if someone could help me out - I tried to post below all codes, which I considered important parts connected with the problem.
I think problem is in my Model names, CRUD classes names or routes - which comes out from Model names above. Also 'instance-verze-dluhy' below is Czech pretty-slug name for that Model, CRUD route.
My
InstanceVersionDebtCrudController
looks like this:And my
InstanceVersionCrudController
looks like this:And my Models, I hope, are configured right: ..
Model
InstanceVersion
:Model
InstanceVersionDebt
:I looked at docs (https://backpackforlaravel.com/docs/6.x/crud-fields) and also at Github codes of demo (https://github.com/Laravel-Backpack/demo/blob/main/app/Http/Controllers/Admin/MonsterCrudController.php) but still couldn't figured it out.
Will be glad for any help, thanks in advance,
Mark
Beta Was this translation helpful? Give feedback.
All reactions