Laravel 5 database issue

前端 未结 13 842
抹茶落季
抹茶落季 2020-12-15 04:24

I\'ve installed laravel 5 successfully by using this command:

composer create-project laravel/laravel test-laravel-5-project dev-develop --prefer-dist
         


        
13条回答
  •  北海茫月
    2020-12-15 05:20

    Laravel is using .env file so change the .env file or change in the database.php file without env()

    'mysql' => [
            'driver'    => 'mysql',
            'host'      => 'localhost',
            'database'  => 'your database name',
            'username'  => 'your database username',
            'password'  => 'your database password',
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
            'strict'    => false,
        ]
    

提交回复
热议问题