Reputation: 45
i had unextracted a project file from git and i want to use it in the local server but when i copy paste the .env and run the command to generate the key. their seems to be an error.
i tried installing auto-dumpload command but it doesnt seem to work
php artisan key:generate
ErrorException : file_get_contents(C:\Users\Anifz\React\getfyt-webapp-master.env): failed to open stream: No such file or directory
at C:\Users\Anifz\React\getfyt-webapp-master\vendor\laravel\framework\src\Illuminate\Foundation\Console\KeyGenerateCommand.php:96 92| { 93| file_put_contents($this->laravel->environmentFilePath(), preg_replace( 94| $this->keyReplacementPattern(), 95| 'APP_KEY='.$key, 96| file_get_contents($this->laravel->environmentFilePath()) 97| )); 98| } 99| 100| /**
Exception trace:
1
file_get_contents("C:\Users\Anifz\React\getfyt-webapp-master.env") C:\Users\Anifz\React\getfyt-webapp-master\vendor\laravel\framework\src\Illuminate\Foundation\Console\KeyGenerateCommand.php:962
Illuminate\Foundation\Console\KeyGenerateCommand::writeNewEnvironmentFileWith("base64:psZqTYKIKLRKPOhzVWUWZ2pny7A/nb4ArWeklrKWofE=") C:\Users\Anifz\React\getfyt-webapp-master\vendor\laravel\framework\src\Illuminate\Foundation\Console\KeyGenerateCommand.php:80Please use the argument -v to see more details.
Upvotes: 1
Views: 6427
Reputation: 4211
I think .env file not exist ,if exist file copy one from .env.examle and set name as .env
Exec this code
php artisan key:generate
Maybe u want clear cache if want it u can with below code
php artisan cache:clear
Upvotes: 0
Reputation: 242
The Following are the steps that you should follow -
.env.example
to .env
composer install
php artisan key:generate
Upvotes: 2