File: D:/HostingSpaces/SBogers54/csbinstallatietechniek.nl/vendor/komma/kms/src/Cache/CacheController.php
<?php declare(strict_types=1);
namespace Komma\KMS\Cache;
use Illuminate\Routing\Controller;
class CacheController extends Controller
{
/**
* Resets php opcache and redirects you back to where you came from
*/
public function clearOpCache()
{
$response = redirect()->back();
$result = opcache_reset();
if($result) {
return $response->with([
'success' => __('KMS::cache.opcache.cleared')
]);
} else {
$response->withErrors(['opcache' => __('KMS::cache.opcache.disabled')]);
}
return $response;
}
}