Change env storage

This commit is contained in:
René Preuß committed 2021-07-23 17:40:31 +02:00
1 parent d25046f545
commit 917af5c140
9 files changed
+48 -24

No files matched your search

+3 -3
View File
@@ -3,6 +3,7 @@
namespace App\Commands\Env;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Storage;
use LaravelZero\Framework\Commands\Command;
class EnvRestoreCommand extends Command
@@ -28,10 +29,9 @@ class EnvRestoreCommand extends Command
*/
public function handle(): int
{
$envFilePath = App::environmentFilePath();
$this->info(sprintf("The following environment file is used: '%s'", $envFilePath));
$this->info(sprintf("The following environment file is used: '%s'", App::environmentFilePath()));
file_put_contents($envFilePath, file_get_contents($this->argument('file')));
Storage::put('.env', Storage::get($this->argument('file')));
$this->info('The environment file was successfully restored.');