Skip to content

Commit 7a7cd52

Browse files
committed
wip
1 parent 63f4ecc commit 7a7cd52

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

7.x-dev/base-components.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ This component helps you show a form _anywhere you want_ inside a modal, so the
126126

127127
To use this component you are required to add `CreateInModalOperation` and/or `UpdateInModalOperation` in your CrudController. The dataform modal component is a extension of a CrudController - so a CrudController for that entity needs to be already set up, and passed to this component as a parameter:
128128

129+
First, in your CrudController, either remove `CreateOperation` in favor of `CreateInModalOperation`, or you can keep both operations. Having both of them is usefull if you want your ListOperation to still show the regular "Create" button, but you would like also to have the possibility to create this entity somewhere else in your application using a modal form.
130+
131+
```php
132+
use \Backpack\DataformModal\Http\Controllers\Operations\CreateInModalOperation;
133+
```
134+
129135
```html
130136
<x-bp-dataform-modal controller="\App\Http\Controllers\Admin\InvoiceCrudController" />
131137
```

0 commit comments

Comments
 (0)