1

when i run php artisan key:generate in cmd it's return

file_get_contents(/project/positiv/core/vendor/psy//.env): failed to open stream: No such file or directory

at

/project/positiv/core/vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php:96
{
    file_put_contents($this->laravel->environmentFilePath(), preg_replace(
        $this->keyReplacementPattern(),
        'APP_KEY='.$key,
        file_get_contents($this->laravel->environmentFilePath())
    ));
}

I am trying to generate APP_KEY!!!

2 Answers2

4

At first generate APP_KEY with the command php artisan key:generate --show. It will print contents on your terminal which you can copy and paste wherever you want. In this case APP_KEY=value on your .env file.

Generated Key format will be something like base64:xxxxxxxxxxxxxxxxxxxxxxx.

pandesantos
  • 339
  • 2
  • 13
0

It seems that you are trying to run artisan command outside the project.

Make sure your terminal is targeting the exact project you want to trigger

Anorbert
  • 36
  • 6