33 lines
517 B
PHP
33 lines
517 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App;
|
||
|
|
|
||
|
|
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\Sujet', 'sujet_id');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get the typeVue that owns the variante.
|
||
|
|
*/
|
||
|
|
public function typeVue()
|
||
|
|
{
|
||
|
|
return $this->belongsTo('App\Typevue', 'typevue_id');
|
||
|
|
}
|
||
|
|
}
|