We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 1 |
Paths | 1 |
Total Lines | 44 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function setup() |
||
16 | { |
||
17 | $this->crud->setModel("Backpack\MenuCRUD\app\Models\MenuItem"); |
||
18 | $this->crud->setRoute(config('backpack.base.route_prefix').'/menu-item'); |
||
19 | $this->crud->setEntityNameStrings('menu item', 'menu items'); |
||
20 | |||
21 | $this->crud->enableReorder('name', 3); |
||
22 | |||
23 | $this->crud->operation('list', function () { |
||
24 | $this->crud->addColumn([ |
||
25 | 'name' => 'name', |
||
26 | 'label' => 'Label', |
||
27 | ]); |
||
28 | $this->crud->addColumn([ |
||
29 | 'label' => 'Parent', |
||
30 | 'type' => 'select', |
||
31 | 'name' => 'parent_id', |
||
32 | 'entity' => 'parent', |
||
33 | 'attribute' => 'name', |
||
34 | 'model' => "\Backpack\MenuCRUD\app\Models\MenuItem", |
||
35 | ]); |
||
36 | }); |
||
37 | |||
38 | $this->crud->operation(['create', 'update'], function () { |
||
39 | $this->crud->addField([ |
||
40 | 'name' => 'name', |
||
41 | 'label' => 'Label', |
||
42 | ]); |
||
43 | $this->crud->addField([ |
||
44 | 'label' => 'Parent', |
||
45 | 'type' => 'select', |
||
46 | 'name' => 'parent_id', |
||
47 | 'entity' => 'parent', |
||
48 | 'attribute' => 'name', |
||
49 | 'model' => "\Backpack\MenuCRUD\app\Models\MenuItem", |
||
50 | ]); |
||
51 | $this->crud->addField([ |
||
52 | 'name' => 'type', |
||
53 | 'label' => 'Type', |
||
54 | 'type' => 'page_or_link', |
||
55 | 'page_model' => '\Backpack\PageManager\app\Models\Page', |
||
56 | ]); |
||
57 | }); |
||
58 | } |
||
59 | } |
||
60 |