private function clearApps(Filesystem $file) { $path = base_path('storages/apps'); if (!$file->isWritable($path)) { $this->showError('Apps folder isn\'t writeable.'); exit; } $file->deleteDirectory($path, true); $file->put($path . '/.gitignore', "* \n!.gitignore"); $this->showInfo('Compiled apps cleared.'); }