belongsToMany('App\User', 'sujets_users', 'sujet_id', 'user_id'); } /** * Get the dossier for the sujet. */ public function dossiers() { return $this->hasMany('App\Dossier'); } /** * Get the medias for the sujet. */ public function medias() { return $this->hasMany('App\Media'); } }