From 567e678f034bc7cd9106ce7d76acf569edcb49d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 14 Sep 2021 13:13:36 +0200 Subject: [PATCH] Fix brand and service on CRUD --- app/Models/Brand.php | 11 ----------- app/Models/Service.php | 4 +++- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/app/Models/Brand.php b/app/Models/Brand.php index 32ce105..88de709 100644 --- a/app/Models/Brand.php +++ b/app/Models/Brand.php @@ -44,17 +44,6 @@ class Brand extends Model CrudAction::create(), CrudAction::update() ] - ], - 'services' => [ - 'label' => Str::ucfirst(Str::plural(trans('models.classes.services'))), - 'type' => CrudType::belongsToMany(), - 'belongsToMany' => Service::class, - 'belongsToManyLabel' => 'name', - 'actions' => [ - CrudAction::view(), - CrudAction::create(), - CrudAction::update(), - ] ] ]; parent::__construct($attributes); diff --git a/app/Models/Service.php b/app/Models/Service.php index b358d7b..feea457 100644 --- a/app/Models/Service.php +++ b/app/Models/Service.php @@ -54,7 +54,9 @@ class Service extends Model 'belongsTo' => Brand::class, 'actions' => [ CrudAction::viewAny(), - CrudAction::view() + CrudAction::view(), + CrudAction::create(), + CrudAction::update() ] ], ];