add shipping rules
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user