add shipping rules

This commit is contained in:
Ludovic CANDELLIER
2023-07-16 14:45:42 +02:00
parent 72a7b270f9
commit 0879b0abf0
459 changed files with 6219 additions and 5416 deletions

View File

@@ -4,7 +4,6 @@ namespace App\Models\Shop;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Znck\Eloquent\Traits\BelongsToThrough;
class Unity extends Model
@@ -12,6 +11,7 @@ class Unity extends Model
use BelongsToThrough, softDeletes;
protected $guarded = ['id'];
protected $table = 'shop_unities';
public function package()
@@ -26,7 +26,7 @@ class Unity extends Model
public function scopeByPackage($query, $id)
{
return $query->where($this->table . '.package_id', $id);
return $query->where($this->table.'.package_id', $id);
}
public function scopeByArticleNature($query, $id)