mardi 20 juin 2017

Conflict database when Multiple Laravel Projects on single machine

I am using Using xampp on windows 10. I have multiple laravel 5.2 projects on this machine. When I am executing Project 1 and it gives me error that database_project_1.table_of_project_2 table or view is not exists, but the table table_of_project_2 is exists in the database_project_2. This issue comes rarely.

Below is the Project 1 .env file

APP_ENV=local
APP_DEBUG=true
APP_KEY=base64:ratSluNv930gb3wp1UOabW6Ze3jEJn3ixtTX/wgqYZc=
APP_URL=http://project-1.dev/

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database_project_1
DB_USERNAME=root
DB_PASSWORD=j@yshr33r@m

Below is the Project 2 .env file

APP_ENV=local
APP_DEBUG=true
APP_KEY=base64:XRgQHfYiKPmHtHZ5UbX38KDlBnl/nyBSt+8qnkOISTg=
APP_URL=http://project-2.dev/

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database_project_2
DB_USERNAME=root
DB_PASSWORD=j@yshr33r@m

I have tried below commands but no luch:

  1. php artisan config:clear
  2. php artisan cache:clear

Please check below screenshot : Database Confict Error

Please anyone help me to solve this issue. Please let me know if any thing missing.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire