diff --git a/composer.json b/composer.json index 4a90a44..8c70bba 100644 --- a/composer.json +++ b/composer.json @@ -19,8 +19,8 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "backpack/crud": "^5.0", - "backpack/pagemanager": "^3.0|^2.0" + "backpack/crud": "^6.0", + "backpack/pagemanager": "^3.2" }, "require-dev": { "phpunit/phpunit" : "^9.0||^7.0", diff --git a/src/app/Http/Controllers/Admin/MenuItemCrudController.php b/src/app/Http/Controllers/Admin/MenuItemCrudController.php index 78e41ed..2ef7779 100644 --- a/src/app/Http/Controllers/Admin/MenuItemCrudController.php +++ b/src/app/Http/Controllers/Admin/MenuItemCrudController.php @@ -49,7 +49,7 @@ public function setup() 'model' => "\Backpack\MenuCRUD\app\Models\MenuItem", ]); $this->crud->addField([ - 'name' => ['type', 'link', 'page_id'], + 'name' => 'type,link,page_id', 'label' => 'Type', 'type' => 'page_or_link', 'page_model' => '\Backpack\PageManager\app\Models\Page', diff --git a/src/resources/views/fields/page_or_link.blade.php b/src/resources/views/fields/page_or_link.blade.php index 236100b..ae1483e 100644 --- a/src/resources/views/fields/page_or_link.blade.php +++ b/src/resources/views/fields/page_or_link.blade.php @@ -3,11 +3,13 @@ {{-- hidden placeholders for content --}} - - + +
{{-- type select --}} @foreach ($field['pages'] as $page) @@ -64,40 +66,46 @@ class="form-control"
{{-- internal link input --}} -