Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to create a yaf project using composer

Shulou Source: shulou.com Published: 2022-06-02 15:04:55 11月17日 Update

Editor to share with you how to use composer to create yaf projects, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

It is very convenient to create a project skeleton using composer create-project.

Yaf is a powerful framework that can be relied on.

Project address:

Https://github.com/fireqong/YafTemplate

In order for yaf to work with composer, I did some handling and integration work and made a yaf template. You can use composer create-project for project initialization. The main work done is as follows:

Build the basic skeleton and create the corresponding directory.

Provide generator support to quickly generate yaf components, such as controllers, models, plug-ins

Provide environmental testing

Suppose you have installed the yaf extension.

Configure php.ini

Configure the following

[Yaf] yaf.use_namespace = Trueyaf.use_spl_autoload = True

Join php.ini.

Build a project

Change to the root directory of your website and run

Composer create-project church/yaf-template yaf-website dev-master

Use

Php console check # Test Environment php console # View all available commands php console make:controller Articles # create controller php console make:model Articles # create model php console make:plugin Test # create plug-in above is all the content of this article "how to use composer to create a yaf project", thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Project work article build content controller plug-in model environment skeleton control detection configuration strong not much commands address most performance more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Docker MySQL Shulou Tech Info OPPO Reno