- Fix vider la barre de recherche quand on clique sur "Réinitialiser" - Fix script index ElasticMedia + ajout condition sur l'existence d'un index - Ajout de la requete Elasticsearch dans MediaController
31 lines
515 B
PHP
31 lines
515 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');
|
|
}
|
|
|
|
}
|