mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-12-22 17:50:22 -05:00
Organize the readme a bit better
This commit is contained in:
parent
a9455f99a0
commit
c031c6d18a
1 changed files with 17 additions and 17 deletions
34
readme.md
34
readme.md
|
@ -81,23 +81,6 @@ First add a function to generate the page:
|
|||
* `delete`: A delete button will appear in the list if this is set to `true`
|
||||
* `export`: An export button will appear in the heading if this is set to `true`
|
||||
|
||||
#### Delete Functionality
|
||||
|
||||
Editable models with `delete` set to `true` must have an entry in the switch statement of the `deleteDelete` function to make deletion functionality work:
|
||||
|
||||
```php
|
||||
switch ($request['model']) {
|
||||
case 'shows':
|
||||
$items = new Shows();
|
||||
break;
|
||||
case 'news':
|
||||
$items = new News();
|
||||
break;
|
||||
default:
|
||||
return 'model-access-fail';
|
||||
}
|
||||
```
|
||||
|
||||
#### Editable Item
|
||||
|
||||
This function should be named the same as the one above except with `Edit` at the end
|
||||
|
@ -240,6 +223,23 @@ Add an array to the menu array in `resources/views/dashboard/elements/menu.blade
|
|||
])
|
||||
```
|
||||
|
||||
#### Additional Requirement for Delete Functionality
|
||||
|
||||
Editable models with `delete` set to `true` must have an entry in the switch statement of the `deleteDelete` function to make deletion functionality work:
|
||||
|
||||
```php
|
||||
switch ($request['model']) {
|
||||
case 'shows':
|
||||
$items = new Shows();
|
||||
break;
|
||||
case 'news':
|
||||
$items = new News();
|
||||
break;
|
||||
default:
|
||||
return 'model-access-fail';
|
||||
}
|
||||
```
|
||||
|
||||
#### Additional Requirement for Export Functionality
|
||||
|
||||
Viewable models and editable models with `export` set to `true` must have an entry in the switch statement of the `getExport` function to make the export button work:
|
||||
|
|
Loading…
Reference in a new issue