2020-11-05 17:08:32 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class OldSlug extends Model
|
|
|
|
|
{
|
|
|
|
|
use HasFactory;
|
|
|
|
|
|
2022-09-03 16:56:16 +02:00
|
|
|
/**
|
|
|
|
|
* BelongsTo product relation
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
|
|
|
*/
|
2022-08-25 12:26:43 +02:00
|
|
|
public function product()
|
|
|
|
|
{
|
2021-03-17 09:28:02 +01:00
|
|
|
return $this->belongsTo('App\Model\Product', 'product_id');
|
2020-11-05 17:08:32 +01:00
|
|
|
}
|
|
|
|
|
|
2022-09-03 16:56:16 +02:00
|
|
|
/**
|
|
|
|
|
* BelongsTo range relation
|
|
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
|
|
|
*/
|
2022-08-25 12:26:43 +02:00
|
|
|
public function range()
|
|
|
|
|
{
|
2021-03-17 09:28:02 +01:00
|
|
|
return $this->belongsTo('App\Model\Range', 'range_id');
|
2020-11-05 17:08:32 +01:00
|
|
|
}
|
|
|
|
|
}
|