Files
ISI2/laravel/app/Models/Billet.php
2025-06-03 14:10:35 +02:00

58 lines
992 B
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class Billet
*
* @property int $id
* @property Carbon $BIL_DATE
* @property string $BIL_TITRE
* @property string $BIL_CONTENU
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
*
* @property Collection|BilletCategorie[] $billet_categories
* @property Collection|Commentaire[] $commentaires
*
* @package App\Models
*/
class Billet extends Model
{
protected $table = 'billets';
protected $casts = [
'BIL_DATE' => 'datetime'
];
protected $fillable = [
'BIL_DATE',
'BIL_TITRE',
'BIL_CONTENU'
];
protected $hidden = [
'id',
'created_at',
'updated_at'
];
public function billet_categories()
{
return $this->hasMany(BilletCategorie::class);
}
public function commentaires()
{
return $this->hasMany(Commentaire::class);
}
}