Comments + 1N relations

This commit is contained in:
Clément
2025-04-17 14:30:56 +02:00
parent ea0884d39f
commit dad50e035f
15 changed files with 380 additions and 29 deletions

View File

@@ -9,4 +9,17 @@ class Billet extends Model
{
/** @use HasFactory<\Database\Factories\BilletFactory> */
use HasFactory;
protected $fillable = [
'BIL_DATE',
'BIL_TITRE',
'BIL_CONTENU',
'created_at',
'updated_at',
];
public function commentaires()
{
return $this->hasMany(Commentaire::class);
}
}