add shipping rules
This commit is contained in:
@@ -14,6 +14,7 @@ class Deliveries
|
||||
public static function getAll($relations = false)
|
||||
{
|
||||
$model = $relations ? Delivery::with($relations) : Delivery::query();
|
||||
|
||||
return $model->orderBy('name', 'asc')->get();
|
||||
}
|
||||
|
||||
@@ -31,6 +32,7 @@ class Deliveries
|
||||
{
|
||||
$id = $data['id'] ?? false;
|
||||
$item = $id ? self::update($data, $id) : self::create($data);
|
||||
|
||||
return $item->id;
|
||||
}
|
||||
|
||||
@@ -44,6 +46,7 @@ class Deliveries
|
||||
$id = $id ? $id : $data['id'];
|
||||
$delivery = self::get($id);
|
||||
$delivery->update($data);
|
||||
|
||||
return $delivery;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user