You've already forked Atomcms-edit
Initial commit
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user