<?php
namespace Modules\ModuleManager\Entities;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Cache;
use Rennokki\QueryCache\Traits\QueryCacheable;
class Module extends Model
{
protected $guarded = ['id'];
public static function boot()
{
parent::boot();
self::created(function ($model) {
Cache::forget('ModuleList');
});
self::updated(function ($model) {
Cache::forget('ModuleList');
});
}
}