Skip to content

Commit a7d1921

Browse files
committed
Merge branch 'master' into 2.2
2 parents 2886c7c + 58c12ed commit a7d1921

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,17 +164,21 @@ With this package your are also able to add a create button for the foreign CRUD
164164

165165
### Modal view
166166

167-
By default the modal is loaded automatically by using `entity` in `on_the_fly` of the field definition resulting in `backpack_url($field['on_the_fly']['entity']).'/ajax/create'` in the field blade.
167+
By default the modals are loaded automatically by using `entity` in `on_the_fly` of the field definition, e.g. resulting in `backpack_url($field['on_the_fly']['entity']).'/ajax/create'` for the create modal.
168168

169-
You can overwrite this behavior by setting a `create_view` attribute:
169+
You can overwrite this behavior for all modals by setting an attribute:
170170

171171
```
172172
'on_the_fly' => [
173173
'entity' => 'entity',
174-
'create_view => 'route/to/modal/html'
174+
'create_modal' => 'route/to/modal/html',
175+
'edit_modal' => 'route/to/modal/html',
176+
'delete_modal' => 'route/to/modal/html',
175177
]
176178
```
177179

180+
> Please be aware that by using this attributes you will be completely responsible for the content of the modal! The defined request has to provide valid HTML which is then filled in `<div class="modal-content"></div>`
181+
178182
### Search logic
179183

180184
The "instant field" triggers the `ajaxIndex()` of the `EntityCrudController` where the field is defined and uses the fields `model` and `attribute` parameters to perform the search on the foreign model.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
}
2222
],
2323
"require": {
24-
"illuminate/support": "~5.5.0|~5.6.0|~5.7.0",
25-
"illuminate/database": "~5.5.0|~5.6.0|~5.7.0",
24+
"illuminate/support": "~5.5.0|~5.6.0|~5.7.0|~5.8.0",
25+
"illuminate/database": "~5.5.0|~5.6.0|~5.7.0|~5.8.0",
2626
"php": "~7.1"
2727
},
2828
"require-dev": {

0 commit comments

Comments
 (0)