Home > Development Tools > composer > Create yaf project using composer

Create yaf project using composer

藏色散人
Release: 2019-09-28 14:21:23
forward
2832 people have browsed it

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!

Create yaf project using composer

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
Copy after login

to php.ini.

Generate project

Switch to your website root directory, run

composer create-project church/yaf-template yaf-website dev-master
Copy after login

use

php console check #检测环境
php console #查看所有可用的命令
php console make:controller Articles        #创建控制器
php console make:model     Articles    #创建模型
php console make:plugin Test    #创建插件
Copy after login

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!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template