mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-27 08:23:58 +00:00
initiate project
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
/**
|
||||
* @copyright Copyright (C) 2018 IP ServerOne Solutions Sdn. Bhd. All rights reserved.
|
||||
* @author Zhe Yang, Lee <zylee@ipserverone.com>
|
||||
* @license Proprietary
|
||||
*/
|
||||
class ClearCache {
|
||||
/** @var Application */
|
||||
private $application;
|
||||
|
||||
/**
|
||||
* @param Application $application
|
||||
*/
|
||||
public function __construct(Application $application) {
|
||||
$this->application = $application;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $request
|
||||
* @param Closure $next
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next) {
|
||||
// only run view:clear if we're not on production
|
||||
if ($this->application->environment() !== 'production') {
|
||||
Artisan::call('view:clear');
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user