ldc-dam/app/Marque.php
Yann Gonidec 7b857744f7 front : fin edition média
front : téléchargement de média
command : suppression des média archivés - regénération des miniatures - import des fichiers Arcadia
2019-07-11 11:45:47 +02:00

41 lines
768 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Marque extends Model
{
/**
* The primary key associated with the table.
*
* @var string
*/
protected $primaryKey = 'codMarq';
/**
* The users that belong to the marque.
*/
public function users()
{
return $this->belongsToMany('App\User', 'marques_users', 'marque_id', 'user_id');
}
/**
* The dossier that belong to the marque.
*/
public function dossiers()
{
return $this->belongsToMany('App\Dossier', 'marques_dossier', 'marque_id', 'dossier_id');
}
/**
* The medias that belong to the marques.
*/
public function medias()
{
return $this->belongsToMany('App\Media', 'medias_marques', 'marque_id', 'media_id');
}
}