31 lines
573 B
PHP
31 lines
573 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
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);
|
|
}
|
|
|
|
public function categories()
|
|
{
|
|
return $this->belongsToMany(Categorie::class);
|
|
}
|
|
}
|