ldc-dam/app/Models/Format.php

34 lines
599 B
PHP
Raw Normal View History

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Format extends Model
{
2022-04-19 16:07:27 +02:00
/**
* The attributes that should be cast.
*
2022-04-19 16:07:27 +02:00
* @var array
*/
2022-04-19 16:07:27 +02:00
protected $casts = [
'largeur' => 'int',
'hauteur' => 'int',
'system' => 'bool',
];
// * RELATIONSHIPS
2022-04-19 16:07:27 +02:00
/**
* BelongsToMany sujets relation
*
2022-04-19 16:07:27 +02:00
* The sujet that belong to the format.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
2022-04-19 16:07:27 +02:00
*/
public function sujets()
{
return $this->belongsToMany(Sujet::class);
}
}