add shipping rules

This commit is contained in:
Ludovic CANDELLIER
2023-07-16 14:45:42 +02:00
parent 297dcc62d2
commit 39c80ce6d1
459 changed files with 6219 additions and 5416 deletions

View File

@@ -2,17 +2,16 @@
namespace App\Models\Shop;
use Illuminate\Database\Eloquent\Model;
use Znck\Eloquent\Traits\BelongsToThrough;
use App\Traits\Model\HasComments;
use Illuminate\Database\Eloquent\Model;
use Znck\Eloquent\Traits\BelongsToThrough;
class PriceList extends Model
{
use BelongsToThrough, HasComments;
protected $guarded = ['id'];
protected $table = 'shop_price_lists';
public function tariff()
@@ -37,17 +36,17 @@ class PriceList extends Model
public function scopeByTariff($query, $id)
{
return $query->where($this->table . '.tariff_id', $id);
return $query->where($this->table.'.tariff_id', $id);
}
public function scopeBySaleChannel($query, $id)
{
return $query->where($this->table . '.sale_channel_id', $id);
return $query->where($this->table.'.sale_channel_id', $id);
}
public function scopeByStatus($query, $id)
{
return $query->where($this->table . '.status_id', $id);
return $query->where($this->table.'.status_id', $id);
}
public function scopeActive($query)