Fix brand and service on CRUD

This commit is contained in:
Jérémy Munsch 2021-09-14 13:13:36 +02:00
parent 9a0a6237e5
commit 567e678f03
2 changed files with 3 additions and 12 deletions

View file

@ -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);

View file

@ -54,7 +54,9 @@ class Service extends Model
'belongsTo' => Brand::class,
'actions' => [
CrudAction::viewAny(),
CrudAction::view()
CrudAction::view(),
CrudAction::create(),
CrudAction::update()
]
],
];