cleaning day
This commit is contained in:
@@ -4,7 +4,10 @@ namespace App\Models\Shop;
|
||||
|
||||
use App\Traits\Model\HasComments;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
||||
use Znck\Eloquent\Relations\BelongsToThrough as RelationsBelongsToThrough;
|
||||
use Znck\Eloquent\Traits\BelongsToThrough;
|
||||
|
||||
class Offer extends Model
|
||||
@@ -15,12 +18,12 @@ class Offer extends Model
|
||||
|
||||
protected $table = 'shop_offers';
|
||||
|
||||
public function article()
|
||||
public function article(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Article::class);
|
||||
}
|
||||
|
||||
public function article_nature()
|
||||
public function article_nature(): RelationsBelongsToThrough
|
||||
{
|
||||
return $this->belongsToThrough(ArticleNature::class, Article::class, null, '', [
|
||||
'App\Models\Shop\Article' => 'article_id',
|
||||
@@ -33,7 +36,7 @@ class Offer extends Model
|
||||
return $this->article->categories();
|
||||
}
|
||||
|
||||
public function price_lists()
|
||||
public function price_lists(): HasManyThrough
|
||||
{
|
||||
return $this->hasManyThrough(PriceList::class, Tariff::class, 'id', 'tariff_id', 'tariff_id', 'id');
|
||||
}
|
||||
@@ -48,12 +51,12 @@ class Offer extends Model
|
||||
);
|
||||
}
|
||||
|
||||
public function tariff()
|
||||
public function tariff(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Tariff::class);
|
||||
}
|
||||
|
||||
public function variation()
|
||||
public function variation(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Variation::class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user