Change env storage

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

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.');