SHOSHA K
SHOSHA K

Reputation: 25

use existing database in Laravel 5.3

hey i'm new to laravel Is that possible with Laravel 5.3 to connect to a existing database ? without make migrations manually ?

Upvotes: 0

Views: 379

Answers (1)

Mayank Pandeyz
Mayank Pandeyz

Reputation: 26258

Inside your project folder there is a file .env, in this file set the following DB details:

DB_CONNECTION=mysql
DB_HOST=192.168.1.12
DB_PORT=3306
DB_DATABASE=databasename
DB_USERNAME=username
DB_PASSWORD=*****

and run php artisan config:cache, your application is connected with the given DB details.

Upvotes: 1

Related Questions