Comments + 1N relations
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user