Home >Development Tools >composer >Create yaf project using composer
The following column composer tutorial will introduce to you how to use composer to create a yaf project. I hope it will be helpful to friends in need!
It is very convenient to use composer create-project to create the project skeleton.
yaf is a framework with strong performance, simple and reliable.
project Address:
https://github.com/fireqong/YafTemplate
In order to allow yaf to work together with composer, I did some moving and integration work and made a yaf template. You can use composer create-project to initialize the project. The main work is as follows:
Build the basic skeleton and create the corresponding directory.
Provide generator support to facilitate rapid generation yaf components, such as: controllers, models, plug-ins
Provide environment detection
Assume you have installed the yaf extension.
Configure php.ini
Add the following configuration
[Yaf] yaf.use_namespace = True yaf.use_spl_autoload = True
to php.ini.
Generate project
Switch to your website root directory, run
composer create-project church/yaf-template yaf-website dev-master
use
php console check #检测环境 php console #查看所有可用的命令 php console make:controller Articles #创建控制器 php console make:model Articles #创建模型 php console make:plugin Test #创建插件
The above is the detailed content of Create yaf project using composer. For more information, please follow other related articles on the PHP Chinese website!