dimanche 25 décembre 2016

I'm using Laravel 5 and I'm not being able to migrate my database using php artisan migrate

I'm using Laravel 5 but I'm not being able to migrate my database table. I have a macbook pro and I'm using Terminal. I'm using php artisan command:
php artisan migrate. When I execute this command, I get the following error message: [PDOException]
SQLSTATE[HY000] [2002] Connection refused.

I have configured my database.php following the official tutorial videos on laracasts.com. My database.php file looks like the following:
...

'fetch' => PDO::FETCH_CLASS,
...
'default' => env('DB_CONNECTION', 'sqlite'),
...
'connections' => [

'sqlite' => [
'driver' => 'sqlite',
'database' => database_path('database.sqlite'),
'prefix' => '',
],
....

I have read many comments on stackoverflow.com about this issue. Most of them are talking about modifying the ".env" file. The thing is I can't find this file! Which makes me wonder if my installation of Laravel is complete or not! I read that my ".env" file might be overriding my "database.php" file but I can't file the ".env" file!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire