mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-07-31 14:16:57 -04:00
38 lines
966 B
PHP
38 lines
966 B
PHP
<?php
|
|
|
|
namespace Modules\Appearance\Entities;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Support\Facades\Cache;
|
|
use Modules\Marketing\Entities\NewUserZone;
|
|
|
|
class HeaderNewUserZonePanel extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
public static function boot()
|
|
{
|
|
parent::boot();
|
|
|
|
self::created(function ($model) {
|
|
Cache::forget('HeaderSection');
|
|
Cache::forget('productSectionItems');
|
|
});
|
|
self::updated(function ($model) {
|
|
Cache::forget('HeaderSection');
|
|
Cache::forget('productSectionItems');
|
|
});
|
|
self::deleted(function ($model) {
|
|
Cache::forget('HeaderSection');
|
|
Cache::forget('productSectionItems');
|
|
});
|
|
}
|
|
|
|
public function newUserZone(){
|
|
return $this->belongsTo(NewUserZone::class,'new_user_zone_id','id');
|
|
}
|
|
}
|