Learn the YII2 framework from scratch (2) Install extension plug-ins through Composer, yii2composer_PHP tutorial

WBOY
Release: 2016-07-13 10:20:33
Original
1257 people have browsed it

Learn the YII2 framework from scratch (2) Install extension plug-ins through Composer, yii2composer

There are not many extensions for yii2 at present. As of today, there are 33 extensions on the official website. However, there are many excellent extensions among these plug-ins.

I tried a few and found a series of useful Yii2 plug-ins. The author is the krajee team from India. The plug-ins they wrote are all very useful. Recommend it.

Krajee team’s website: http://krajee.com, there are several good plug-ins you can try.

The following introduces the Yii2 plug-in installation method. Install the plugin yii2-detail-view through Composer.

Git

It is recommended to install Git. Composer will use Git Clone when installing plug-ins. Git official download website: Portal

If you have not installed Git, CMD will prompt you that git is not a valid command when executing the command. Then find the hard drive download address. In fact, it doesn't matter if you don't install git.

After installing Git under Windows, configure the environment variables and add ;D:Program FilesGitbin to the Path environment variable.

Installation method

yii2-detail-view

Official description:

Installation 
The preferred way to install this extension is through composer.
Either run:
$ php composer.phar require kartik-v/yii2-detail-view "*"
or add:
"kartik-v/yii2-detail-view": "*"
to the require section of your composer.json file.

Copy after login

This is compared to the installation method in Linux environment. Composer is used in Windows

Execute the command under CMD: composer require kartik-v/yii2-detail-view "*"

Learn the YII2 framework from scratch (2) Install extension plug-ins through Composer, yii2composer_PHP tutorial

After the installation is completed, we will see that 5 other plug-ins were installed during the installation process. These are plug-ins that have dependencies on yii2-detail-view,

This is the usefulness of the Composer tool, which automatically analyzes dependencies and helps us install it perfectly.

See the "kartik-v" directory in the webroot/appname/vendor directory. See that there are 6 directories stored in the path. The installation is successful.

That’s it for plug-in installation, as for how to use it. It will be introduced later in the learning process. ^_^

The following error occurs when yii2 is installed using composer, please help...

Your php does not enable the mongodb extension~~~~It has nothing to do with Composer

Open your php.ini and enable the mongodb extension (remove the ";" sign in front)

Restart you server (apache, iis...)

Then try again

If it is a Linux system, I don’t know, you can search it

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/866660.htmlTechArticleLearn the YII2 framework from scratch (2) Install extension plug-ins through Composer, yii2composer. Currently, there are not many extensions for yii2. As of today, there are a total of 33 on the official website, but these plug-ins...
Related labels:
source:php.cn
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