fix devops error

This commit is contained in:
ludo
2024-01-05 01:30:46 +01:00
parent 90b0af5b2d
commit 5144c1f7fd
128 changed files with 410 additions and 2580 deletions

View File

@@ -16,12 +16,12 @@ class Category extends parentCategory
{
use CascadeDelete, SoftDeletes, Taggable, Userstamps;
public $translatable = [];
protected $guarded = ['id'];
protected $table = 'categories';
public $translatable = [];
protected $cascadeDeleteMorph = ['Articles'];
protected $fillable = [

View File

@@ -50,9 +50,7 @@ class Customer extends Authenticatable
public function deliveries()
{
return $this->hasManyDeepFromRelations(
$this->sale_channels(),
(new SaleChannel())->deliveries())
return $this->hasManyDeepFromRelations($this->sale_channels(), (new SaleChannel())->deliveries())
->whereNull('shop_customer_sale_channels.deleted_at');
}

View File

@@ -22,7 +22,11 @@ class PriceListValue extends Model
public function tariff()
{
return $this->belongsToThrough(Tariff::class, PriceList::class, null, '',
return $this->belongsToThrough(
Tariff::class,
PriceList::class,
null,
'',
[
'App\Models\Shop\Tariff' => 'tariff_id',
'App\Models\Shop\PriceList' => 'price_list_id',

View File

@@ -8,6 +8,8 @@ use Rinvex\Tags\Models\Tag as parentTag;
class Tag extends parentTag
{
public $translatable = [];
protected $guarded = ['id'];
protected $fillable = [
@@ -19,8 +21,6 @@ class Tag extends parentTag
'tag_group_id',
];
public $translatable = [];
// TODO
public function offers()
{
@@ -69,9 +69,11 @@ class Tag extends parentTag
public function scopeWithCountArticlesByCategory($query, $category_id)
{
return $query->withCount(['articles' => function ($query) use ($category_id) {
$query->byCategoryParent($category_id);
}]);
return $query->withCount([
'articles' => function ($query) use ($category_id) {
$query->byCategoryParent($category_id);
},
]);
}
public function scopeById($query, $id)