You've already forked Atomcms-edit
30 lines
667 B
PHP
Executable File
30 lines
667 B
PHP
Executable File
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models\Miscellaneous;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
class WebsitePermission extends Model
|
|
{
|
|
/**
|
|
* Zorgt ervoor dat alle velden behalve ID gevuld mogen worden.
|
|
*/
|
|
#[\Override]
|
|
protected $guarded = ['id', 'created_at', 'updated_at', 'permission', 'rank_id'];
|
|
|
|
/**
|
|
* Automatische cache-opschoning bij wijzigingen.
|
|
*/
|
|
#[\Override]
|
|
protected static function booted(): void
|
|
{
|
|
$clearCache = fn () => Cache::forget('website_permissions');
|
|
|
|
static::saved($clearCache);
|
|
static::deleted($clearCache);
|
|
}
|
|
}
|