add shipping rules

This commit is contained in:
Ludovic CANDELLIER
2023-07-16 14:45:42 +02:00
parent 297dcc62d2
commit 39c80ce6d1
459 changed files with 6219 additions and 5416 deletions

View File

@@ -2,8 +2,8 @@
namespace App\Repositories\Shop;
use App\Repositories\Core\Tag;
use App\Models\Shop\Producer;
use App\Repositories\Core\Tag;
use App\Traits\Repository\Imageable;
class Producers
@@ -17,6 +17,7 @@ class Producers
foreach ($data as $key => $name) {
$export[] = ['value' => $key, 'text' => $name];
}
return $export;
}
@@ -50,6 +51,7 @@ class Producers
$producer = self::get($id);
$data = $producer->toArray();
$data['tags'] = self::getTagsByProducer($producer);
return $data;
}
@@ -67,6 +69,7 @@ class Producers
$producer = self::store($data);
self::storeImages($producer, $images);
self::storeTags($producer, $tags);
return $producer;
}
@@ -85,6 +88,7 @@ class Producers
$id = $id ? $id : $data['id'];
$item = self::get($id);
$item->update($data);
return $item;
}