ldc-dam/app/Media.php
2019-05-29 14:05:54 +02:00

34 lines
568 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Media extends Model
{
protected $table = "medias";
/**
* Get the dossier that owns the media.
*/
public function dossier()
{
return $this->belongsTo('App\Dossier', 'dossier_id');
}
/**
* Get the sujet that owns the media.
*/
public function sujet()
{
return $this->belongsTo('App\Sujet', 'sujet_id');
}
/**
* Get the typemedia that owns the media.
*/
public function typemedia()
{
return $this->belongsTo('App\Typemedia', 'typemedia_id');
}
}