to squeeze
This commit is contained in:
@@ -1,12 +1,57 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
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
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\BilletFactory> */
|
||||
use HasFactory;
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user