Organize the readme a bit better

This commit is contained in:
Kevin MacMartin 2016-12-19 22:35:38 -05:00
parent a9455f99a0
commit c031c6d18a

View file

@ -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: