30 lines
595 B
PHP
30 lines
595 B
PHP
<?php
|
|
|
|
namespace App\Models\Shop;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Znck\Eloquent\Traits\BelongsToThrough;
|
|
|
|
class PriceGeneric extends Model
|
|
{
|
|
use BelongsToThrough;
|
|
|
|
protected $guarded = ['id'];
|
|
protected $table = 'shop_price_generics';
|
|
|
|
public function prices()
|
|
{
|
|
return $this->hasMany('App\Models\Shop\Price');
|
|
}
|
|
|
|
public function values()
|
|
{
|
|
return $this->hasMany('App\Models\Shop\PriceGenericValue');
|
|
}
|
|
|
|
public function articles()
|
|
{
|
|
return $this->hasManyThrough('App\Models\Shop\Article','App\Models\Shop\Price');
|
|
}
|
|
|
|
} |