2021-08-18 17:04:51 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class Range extends Model
|
|
|
|
|
{
|
2022-01-11 12:39:28 +01:00
|
|
|
/**
|
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
2021-08-18 17:04:51 +02:00
|
|
|
protected $fillable = ['name'];
|
|
|
|
|
|
2022-08-11 10:26:29 +02:00
|
|
|
/**
|
|
|
|
|
* Product relation
|
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
|
|
|
*/
|
2021-08-18 17:04:51 +02:00
|
|
|
public function products()
|
|
|
|
|
{
|
|
|
|
|
return $this->hasMany(Product::class);
|
|
|
|
|
}
|
|
|
|
|
}
|