ldc-dam/app/Models/Format.php

32 lines
517 B
PHP
Raw Normal View History

<?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');
}
}