Add prices and filtering by sale_channel with default
This commit is contained in:
@@ -6,6 +6,21 @@ use App\Models\Shop\SaleChannel;
|
||||
|
||||
class SaleChannels
|
||||
{
|
||||
public static function getDefaultID()
|
||||
{
|
||||
return self::getDefault()->id;
|
||||
}
|
||||
|
||||
public static function getDefault()
|
||||
{
|
||||
return self::getByCode('clic');
|
||||
}
|
||||
|
||||
public static function getByCode($code)
|
||||
{
|
||||
return SaleChannel::byCode($code)->first();
|
||||
}
|
||||
|
||||
public static function getOptions()
|
||||
{
|
||||
return SaleChannel::orderBy('name', 'asc')->pluck('name', 'id')->toArray();
|
||||
|
||||
Reference in New Issue
Block a user