fixes on mail templates, change order edit layout, add DeliveryTypes, DeliveryTypeCalculations & DeliveryPackages
This commit is contained in:
16
app/Models/Shop/DeliveryPackage.php
Normal file
16
app/Models/Shop/DeliveryPackage.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Shop;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class DeliveryPackage extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
protected $table = 'shop_delivery_packages';
|
||||
|
||||
public function scopeByWeight($query, $weight)
|
||||
{
|
||||
return $query->orderBy('weight')->where($this->table . '.weight', '>=', $weight);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user