Home > Article > PHP Framework > Introducing Homestead, the ThinkPHP development environment
The following tutorial column will introduce you to Homestead, the ThinkPHP development environment. I hope it will be helpful to friends in need!
How to build a ThinkPHP development environmentWe know that Homestead is one of the officially recommended development environments for Laravel , which consists of the Homestead script of the customized Vagrantfile and the Vagrant box containing PHP development-related software. But Homestead not only supports the quick construction of sites adapted to Laravel, but also supports popular frameworks in PHP such as
symfony,
zendFramework, yii
, and support ThinkPHP
starting from v.7.18.0
(increase the PR of ThinkPHP (https://github.com/laravel/homestead/pull/952))
Framework types supported by the latest version (https://github.com/laravel/homestead/tree/v10.3.1/scripts/site-types)
Configure ThinkPHP site
1. Add sites:
- map: thinkphp.test
to: /home/vagrant/my-thinkphp-project/web
type: thinkphp
to the
file. 2. Update the Nginx configuration of the virtual machine
vagrant reload --provisionI am using the environment built by the Laravel development environment document in the community. The Homestead version is
7.8.0
. Just add the
option and reconfigure it, and it will report If there is no error related to the script, copy the thinkPHP site script (https://github.com/laravel/homestead/blob/v7.18.0/scripts/serve-thinkphp.sh) to the scripts file of
homestead , and then vagrant reload --provision
can successfully create the ThinkPHP site.
The above is the detailed content of Introducing Homestead, the ThinkPHP development environment. For more information, please follow other related articles on the PHP Chinese website!