27 lines
364 B
PHP
27 lines
364 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
|
||
|
|
class Recherche extends Model
|
||
|
|
{
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get the sujet that owns the recherche.
|
||
|
|
*/
|
||
|
|
public function sujet()
|
||
|
|
{
|
||
|
|
return $this->belongsTo('App\Sujet', 'sujet_id');
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get the user that owns the recherche.
|
||
|
|
*/
|
||
|
|
public function user()
|
||
|
|
{
|
||
|
|
return $this->belongsTo('App\User', 'id');
|
||
|
|
}
|
||
|
|
}
|