Home >Backend Development >PHP Tutorial >How to merge two different Laravel projects?
Currently, it needs to be developed based on multiple Laravel5.1 projects with different purposes, using different second-level domain names to distinguish them.
For example, I cloned two Laravel5.1 projects A and B for different purposes from Github, and I need to configure a.xxx.com to access project A and b.xxx.com to access project B.
How to achieve this goal and share the user database? Should I use different folders and two databases, or can the two projects be merged together? If it can be merged, how to do it?
Currently, development needs to be based on multiple Laravel5.1 projects with different uses, and different second-level domain names are used to distinguish them.
For example, I cloned two Laravel5.1 projects A and B for different purposes from Github, and I need to configure a.xxx.com to access project A and b.xxx.com to access project B.
How to achieve this goal and share the user database? Should I use different folders and two databases, or can the two projects be merged together? If it can be merged, how to do it?
For example, your A project is located at
F:Zenda
For example, your B project is located at
F:Zendb
<code><VirtualHost *:80> ServerAdmin g@godruoyi.com # 项目A DocumentRoot "F:\Zend\a" # 访问项目A的域名 ServerName a.xxx.com ErrorLog "logs/godruoyi_ok.log" CustomLog "logs/godruoyi_ok.log" common <Directory "F:\Zend\a"> AllowOverride All </Directory> <IfModule dir_module> # 入口文件 DirectoryIndex app.php </IfModule> </VirtualHost> <VirtualHost *:80> ServerAdmin g@godruoyi.com # 项目B DocumentRoot "F:\Zend\b" # 访问项目B的域名 ServerName b.xxx.com ErrorLog "logs/godruoyi_ok.log" CustomLog "logs/godruoyi_ok.log" common <Directory "F:\Zend\b"> AllowOverride All </Directory> <IfModule dir_module> # 入口文件 DirectoryIndex app.php </IfModule> </VirtualHost></code>
C:WindowsSystem32driversetchosts
127.0.0.1 a.xxx.com b.xxx.com