ldc-agis/app/Models/Convictionpage.php

56 lines
1.7 KiB
PHP

<?php
namespace App\Models;
use App\Traits\Models\ActivityLog;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
/**
* @property float $key_feed Key figure 'bien nourrir'.
* @property float $key_earth_1 Key figure 'respecter la terre' 1.
* @property float $key_earth_2 Key figure 'respecter la terre' 2.
* @property float $key_together_1 Key figure 'vivre ensemble' 1.
* @property float $key_together_2 Key figure 'vivre ensemble' 2.
* @property float $key_together_3 Key figure 'vivre ensemble' 3.
* @property float $key_together_4 Key figure 'vivre ensemble' 4.
* @property float $key_territory Key figure 'intégrer son territoire'.
* @property-read \Carbon\Carbon $created_at Created date.
* @property-read \Carbon\Carbon $updated_at Updated date.
*/
class Convictionpage extends Model
{
use ActivityLog;
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'key_feed',
'key_earth_1',
'key_earth_2',
'key_together_1',
'key_together_2',
'key_together_3',
'key_together_4',
'key_territory',
];
/**
* Perform any actions required after the model boots.
*
* @return void
*/
protected static function booted(): void
{
static::creating(function () {
throw new \RuntimeException("Creating a new page is not authorized");
});
static::deleting(function () {
throw new \RuntimeException('Deleting a page is not authorized');
});
}
}