|
4 | 4 |
|
5 | 5 | // define the possible document types |
6 | 6 | // each type can exist exactly one time in the database |
7 | | - 'types' => [ |
| 7 | + 'types' => [ |
8 | 8 | 'imprint', |
9 | 9 | 'privacy', |
10 | 10 | 'sbt' |
11 | 11 | ], |
12 | 12 |
|
| 13 | + // define the access to the documents (see backpack for mor information) |
| 14 | + 'access' => [ |
| 15 | + // can users list documents |
| 16 | + 'list' => true, |
| 17 | + 'create' => false, // be sure to seed your documents if disabled |
| 18 | + 'update' => true, |
| 19 | + 'delete' => false, |
| 20 | + |
| 21 | + /* 'revisions', reorder', 'show', 'details_row' */ |
| 22 | + ], |
| 23 | + |
13 | 24 | // define the used body type. |
14 | 25 | // possible values are: |
15 | 26 | // * plaintext |
|
18 | 29 | // -> will present the summernote rich text editor and store styled html to the database |
19 | 30 | // * md |
20 | 31 | // -> will present the simplemde markdown editor and store markdown to the database |
21 | | - 'body_type' => 'md', |
| 32 | + 'body_type' => 'md', |
22 | 33 |
|
23 | 34 | // the model to use with this package |
24 | 35 | // keep in mind: when changing the model, you most likely need to change the Transformer also |
25 | | - 'model_class' => \Webfactor\Laravel\Backpack\Documents\Models\Document::class, |
| 36 | + 'model_class' => \Webfactor\Laravel\Backpack\Documents\Models\Document::class, |
26 | 37 |
|
27 | 38 | // the transformer class used to transform the model for api responses |
28 | 39 | 'transformer_class' => \Webfactor\Laravel\Backpack\Documents\Transformers\DocumentTransformer::class, |
29 | 40 |
|
30 | 41 | // customize your backend parameters |
31 | | - 'backend' => [ |
| 42 | + 'backend' => [ |
32 | 43 |
|
33 | 44 | // the CRUD controller to be used |
34 | | - 'controller' => Webfactor\Laravel\Backpack\Documents\Controllers\DocumentCrudController::class, |
| 45 | + 'controller' => Webfactor\Laravel\Backpack\Documents\Controllers\DocumentCrudController::class, |
35 | 46 |
|
36 | 47 | // the route prefix for the default routes |
37 | 48 | 'route_prefix' => 'wfcms', |
38 | 49 |
|
39 | 50 | // the route endpoint for the default routes |
40 | | - 'route' => 'document', |
| 51 | + 'route' => 'document', |
41 | 52 |
|
42 | 53 | // the midlewares to use |
43 | | - 'middleware' => ['web', 'admin'] |
| 54 | + 'middleware' => ['web', 'admin'] |
44 | 55 | ], |
45 | 56 |
|
46 | 57 | // customize the api |
47 | | - 'api' => [ |
| 58 | + 'api' => [ |
48 | 59 |
|
49 | 60 | // the API controller to be used |
50 | | - 'controller' => Webfactor\Laravel\Backpack\Documents\Controllers\DocumentApiController::class, |
| 61 | + 'controller' => Webfactor\Laravel\Backpack\Documents\Controllers\DocumentApiController::class, |
51 | 62 |
|
52 | 63 | // the route prefix for the default routes |
53 | 64 | 'route_prefix' => 'api/v1', |
54 | 65 |
|
55 | 66 | // the route endpoint for the default routes |
56 | | - 'route' => 'documents', |
| 67 | + 'route' => 'documents', |
57 | 68 |
|
58 | 69 | // the midlewares to use |
59 | | - 'middleware' => ['apiv1'] |
| 70 | + 'middleware' => ['apiv1'] |
60 | 71 | ] |
61 | 72 |
|
62 | 73 | ]; |
0 commit comments