2020-11-05 17:08:32 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
2021-03-17 09:28:02 +01:00
|
|
|
class Range extends Model
|
2020-11-05 17:08:32 +01:00
|
|
|
{
|
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
|
|
public function products() {
|
2021-03-17 09:28:02 +01:00
|
|
|
return $this->hasMany('App\Models\Product', 'range_id');
|
2020-11-05 17:08:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function old_slugs() {
|
2020-11-09 11:03:13 +01:00
|
|
|
return $this->hasMany('App\Model\OldSlug', 'ranges');
|
2020-11-05 17:08:32 +01:00
|
|
|
}
|
|
|
|
|
}
|