2019-07-11 11:45:47 +02:00
|
|
|
<?php
|
|
|
|
|
|
2019-09-12 11:08:25 +02:00
|
|
|
namespace App\Models;
|
2019-07-11 11:45:47 +02:00
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class Variante extends Model
|
|
|
|
|
{
|
2022-04-19 16:07:27 +02:00
|
|
|
/**
|
|
|
|
|
* The primary key associated with the table.
|
|
|
|
|
*
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
|
|
|
|
protected $primaryKey = 'codeVariante';
|
2019-07-11 11:45:47 +02:00
|
|
|
|
2022-06-20 14:57:58 +02:00
|
|
|
// * RELATIONSHIPS
|
|
|
|
|
|
2022-04-19 16:07:27 +02:00
|
|
|
/**
|
2022-06-20 14:57:58 +02:00
|
|
|
* BelongsTo sujet relation
|
|
|
|
|
*
|
2019-07-11 11:45:47 +02:00
|
|
|
* Get the sujet that owns the variante.
|
2022-06-20 14:57:58 +02:00
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
2019-07-11 11:45:47 +02:00
|
|
|
*/
|
|
|
|
|
public function sujet()
|
|
|
|
|
{
|
2022-06-20 14:57:58 +02:00
|
|
|
return $this->belongsTo(Sujet::class);
|
2019-07-11 11:45:47 +02:00
|
|
|
}
|
|
|
|
|
|
2022-04-19 16:07:27 +02:00
|
|
|
/**
|
2022-06-20 14:57:58 +02:00
|
|
|
* BelongsTo typeVue relation
|
|
|
|
|
*
|
2022-04-19 16:07:27 +02:00
|
|
|
* Get the typeVue that owns the variante.
|
2022-06-20 14:57:58 +02:00
|
|
|
*
|
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
2022-04-19 16:07:27 +02:00
|
|
|
*/
|
|
|
|
|
public function typeVue()
|
|
|
|
|
{
|
2022-06-20 14:57:58 +02:00
|
|
|
return $this->belongsTo(TypeVue::class);
|
2022-04-19 16:07:27 +02:00
|
|
|
}
|
2019-07-11 11:45:47 +02:00
|
|
|
}
|