commit f57605278d891122eb538c8ec0a6ca32c570ad40
Author: Olivier Legat <olivier.legat@ldc.fr>
Date: Wed Feb 10 08:45:45 2021 +0100
selection des medias dans le panier
Download de médias
Tous formats system=1
commit 567476c5467361bb7ab3958804d49ed4229c6526
Author: Olivier Legat <olivier.legat@ldc.fr>
Date: Mon Feb 8 17:24:47 2021 +0100
Accès à la page panier depuis le menu du composant
31 lines
517 B
PHP
31 lines
517 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
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\Models\Sujet', 'sujets_formats', 'format_id', 'sujet_id');
|
|
}
|
|
|
|
}
|