From 95093091cd452ec11b7c650e840dfe41791ce845 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 21 May 2019 17:36:50 +0200 Subject: [PATCH] wip #2783 @@0.5 --- src/app/Http/Controllers/CubistModelCrudController.php | 7 ++++--- .../migrations/2019_05_20_161943_create_models_table.php | 6 +----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/app/Http/Controllers/CubistModelCrudController.php b/src/app/Http/Controllers/CubistModelCrudController.php index 8b7ccc9..a417642 100644 --- a/src/app/Http/Controllers/CubistModelCrudController.php +++ b/src/app/Http/Controllers/CubistModelCrudController.php @@ -2,17 +2,19 @@ namespace Cubist\Backpack\app\Http\Controllers; +use Backpack\CRUD\app\Http\Controllers\CrudController; + +// VALIDATION: change the requests to match your own file names if you need form validation use Cubist\Backpack\app\Http\Requests\CubistModelRequest as StoreRequest; use Cubist\Backpack\app\Http\Requests\CubistModelRequest as UpdateRequest; use Backpack\CRUD\CrudPanel; -use Webfactor\Laravel\Backpack\NestedModels\Controllers\NestedModelsCrudController; /** * Class ModelCrudController * @package App\Http\Controllers\Admin * @property-read CrudPanel $crud */ -class CubistModelCrudController extends NestedModelsCrudController +class CubistModelCrudController extends CrudController { public function setup() { @@ -22,7 +24,6 @@ class CubistModelCrudController extends NestedModelsCrudController |-------------------------------------------------------------------------- */ $this->crud->setModel('Cubist\Backpack\app\Models\CubistModel'); - $this->treeSetup(); $this->crud->setRoute(config('backpack.base.route_prefix') . '/model'); $this->crud->setEntityNameStrings('model', 'models'); diff --git a/src/database/migrations/2019_05_20_161943_create_models_table.php b/src/database/migrations/2019_05_20_161943_create_models_table.php index a4ddf6a..c1d7a43 100644 --- a/src/database/migrations/2019_05_20_161943_create_models_table.php +++ b/src/database/migrations/2019_05_20_161943_create_models_table.php @@ -2,12 +2,9 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -use Webfactor\Laravel\Backpack\NestedModels\Traits\NestedModelTrait; class CreateModelsTable extends Migration { - use NestedModelTrait; - /** * Run the migrations. * @@ -21,7 +18,6 @@ class CreateModelsTable extends Migration $table->string('label'); $table->json('attributes'); $table->timestamps(); - $table->nestedSet(); }); } @@ -32,6 +28,6 @@ class CreateModelsTable extends Migration */ public function down() { - Schema::drop('cubist_models'); + Schema::drop('models'); } } -- 2.39.5