16 lines
359 B
PHP
16 lines
359 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Ranges extends Model
|
|
{
|
|
public function products() {
|
|
return $this->hasMany('App\Models\Products', 'range_id');
|
|
}
|
|
|
|
public function reductions() {
|
|
return $this->belongsToMany('App\Models\Reductions', 'reduction_config', 'range_id', 'reduction_id');
|
|
}
|
|
}
|