hey i'm new to laravel Is that possible with Laravel 5.3 to connect to a existing database ? without make migrations manually ?
1条回答 默认 最新
- douzhicui2209 2017-04-19 09:13关注
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.本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报