Fix 修复 #138 后导致的错误

This commit is contained in:
兔姬桑
2021-02-10 01:48:02 -05:00
parent 63b1c8b567
commit b8141f6457

View File

@@ -3,12 +3,17 @@
namespace App\Observers;
use App\Models\Config;
use Cache;
use Artisan;
class ConfigObserver
{
public function updated(Config $config) // 更新设定
{
Cache::forget('settings');
if (config('app.debug')) {
Artisan::call('optimize:clear');
} else {
Artisan::call('optimize:clear');
Artisan::call('optimize');
}
}
}