HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers95/rentman.io/app/Komma/SiteConfig/Kms/SiteConfigController.php
<?php

namespace App\Komma\SiteConfig\Kms;

/**
 * @author      Komma <info@komma.pro>
 * @copyright   (c) 2012-2016, Komma
 */

use App\Komma\Kms\Core\SectionController;
use App\Komma\SiteConfig\Models\SiteConfig;
use Illuminate\Database\Eloquent\Model;

class SiteConfigController extends SectionController
{
    protected $slug = 'siteconfig';

    protected $forModelName = SiteConfig::class;

    public function __construct(SiteConfigSection $section)
    {
        parent::__construct($section);
    }

    public function store($model = null, $updateExistingModel = false)
    {
        $this->clearCache();

        return parent::store($model, $updateExistingModel);
    }

    public function destroy(Model $model)
    {
        $this->clearCache();

        return parent::destroy($model);
    }

    private function clearCache()
    {
        \Cache::forget('siteConfig');
    }
}