laravel 4: key not being generated with artisan

后端 未结 7 2167
温柔的废话
温柔的废话 2020-12-15 05:39

When running

php artisan key:generate

I can see the generated key in my shell, but the variable \'key\' in app.php remains empt

7条回答
  •  半阙折子戏
    2020-12-15 06:24

    first type any 32 character like 'hyhyhGGyhyhyhyhy23hyhy23hyhy23hy' this and then re execute the command in terminal/cmd.

    Step 1:

    go to app ---> Config --> app.php

    step 2:

    'key' => '10101010101010101010101010101010', type any 32 digit or character in that place.

    step 3:

    go to terminal / cmd & type : "php artisan key:generate" press enter

    step 4:

    see the key has been changed :)

    [ It is because in Laravel 4 By using "php artisan key:generate" we simply can replace the default key any time. But if it is an empty space it can not be able to hold the place. ]

    Enjoy coding :) \m/

提交回复
热议问题