[WIP] Fix ergonomics rules
This commit is contained in:
@@ -8,19 +8,19 @@ class ProductPrice extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function Product()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Shop\Product');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function ProductAttribute()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Shop\ProductAttribute');
|
||||
}
|
||||
|
||||
public function scopeByProduct($query, $id)
|
||||
{
|
||||
return $query->where('product_id', $id);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user