ldc-dam/app/Format.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

31 lines
501 B
PHP

<?php
namespace App;
use App\Scopes\SystemScope;
use Illuminate\Database\Eloquent\Model;
class Format extends Model
{
/**
* The "booting" method of the model.
*
* @return void
*/
protected static function boot()
{
parent::boot();
static::addGlobalScope(new SystemScope);
}
/**
* The sujet that belong to the format.
*/
public function sujets()
{
return $this->belongsToMany('App\Sujet', 'sujets_formats', 'format_id', 'sujet_id');
}
}