gintare's avatar

Laravel, WAMP installation, .env file is missing

Laravel, WAMP installation, .env file is missing.

there is no .env file, thus , for instance, database connection is not working, unless you remove environmental variables:

    'mysql' => [
        'driver'    => 'mysql',
       /* 'host'      => env('DB_HOST', 'localhost'),
        'database'  => env('DB_DATABASE', 'forge'),
        'username'  => env('DB_USERNAME', 'forge'),
        'password'  => env('DB_PASSWORD', ''), */
        'host'      => 'localhost',
        'database'  => 'forge',
        'username'  => 'root',
        'password'  => 'gintare',   

I am wondering, where i should search for this file in Laravel WAMP installation.?

0 likes
8 replies
RachidLaasri's avatar

Well, you should have a file named .env.example just copy its content to a .env file.

1 like
Bahjaat's avatar

Method env() is still working without an .env file. It takes the default from the second argument.

1 like
gintare's avatar

There is no file .env.example. I have installed Laravel in WAMP: c:\Bitnami\wampstack-5.5.30-0\apache2\htdocs\lar_prog\b1>composer create-project laravel/laravel b1v2 --prefer-dist

gintare's avatar

I am sorry, i have found this file. Than i look through the project files in NetBEans, they do not show files starting with dot. But i i browser to the folder directly, such file exists.

1 like
jlrdw's avatar

I also use NetBeans and .env does not show, you are correct.

Please or to participate in this conversation.