<?php

namespace App\Observers;

use Illuminate\Support\Facades\Cache;
use Mtc\ContentManager\Contracts\GlobalContent;

class GlobalContentObserver extends \Mtc\ContentManager\Observers\GlobalContentObserver
{
    public function saved(GlobalContent $content)
    {
        Cache::forget(tenant('id') . "-global-content-" . $content->slug);
    }

    public function deleted(GlobalContent $content)
    {
        Cache::forget(tenant('id') . "-global-content-" . $content->slug);
    }
}
