ldc-dam/app/Models/Variante.php
2022-06-20 14:04:15 +02:00

31 lines
582 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Variante extends Model
{
/**
* The primary key associated with the table.
*
* @var string
*/
protected $primaryKey = 'codeVariante';
/**
* Get the sujet that owns the variante.
*/
public function sujet()
{
return $this->belongsTo('App\Models\Sujet', 'sujet_id');
}
/**
* Get the typeVue that owns the variante.
*/
public function typeVue()
{
return $this->belongsTo('App\Models\Typevue', 'typevue_id');
}
}