P粉5877801032023-08-27 11:05:26
Laravel uses the DotEnv library to configure different environments.
You can follow the Laravel documentation to generate .env
files for each environment (local and development server).
P粉9868609502023-08-27 10:45:07
On a real server, you need to connect to the database server that contains the database used by the application,
Therefore the .env
configuration related to the database needs to be changed to the actual database server
DB_HOST=[这里是数据库服务器IP] DB_PORT=3306 DB_DATABASE=[数据库名称] DB_USERNAME=[用户名] DB_PASSWORD=[用户密码]
What you need to read about Laravel Project Deployment