File: D:/HostingSpaces/SBogers10/rentman2019.komma.pro/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');
}
}