This commit is contained in:
Ludovic CANDELLIER
2022-11-11 13:05:40 +01:00
parent f89acd9399
commit 7df2421373
104 changed files with 1212 additions and 764 deletions

View File

@@ -11,9 +11,10 @@ class Deliveries
return Delivery::orderBy('name', 'asc')->get()->pluck('name', 'id')->toArray();
}
public static function getAll()
public static function getAll($relations = false)
{
return Delivery::orderBy('name', 'asc')->get();
$model = $relations ? Delivery::with($relations) : Delivery::query();
return $model->orderBy('name', 'asc')->get();
}
public static function getAllWithSaleChannel()