ldc-dam/app/Models/Variante.php

42 lines
792 B
PHP
Raw Normal View History

<?php
namespace App\Models;
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';
// * RELATIONSHIPS
2022-04-19 16:07:27 +02:00
/**
* BelongsTo sujet relation
*
* Get the sujet that owns the variante.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function sujet()
{
return $this->belongsTo(Sujet::class);
}
2022-04-19 16:07:27 +02:00
/**
* BelongsTo typeVue relation
*
2022-04-19 16:07:27 +02:00
* Get the typeVue that owns the variante.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
2022-04-19 16:07:27 +02:00
*/
public function typeVue()
{
return $this->belongsTo(TypeVue::class);
2022-04-19 16:07:27 +02:00
}
}