Learning YII2 framework from scratch (2) using Composer to install extension plug-in _ php instance

Source: Internet
Author: User
When using the Yii framework for development, there are some excellent plug-ins that can help us get twice the result with half the effort. The following describes how to install the Yii2 plug-in through Composer. Currently, there are not many extensions of yii2. up to today, there are a total of 33 extensions on the official website. However, many of these extensions have excellent extensions,

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

Krajee team Website: http://krajee.com, there are a few good plug-ins to try.

The following describes how to install the Yii2 plug-in. Install the plug-in yii2-detail-view through Composer.

Git

We recommend that you install Git. Git Clone will be used when the Composer plug-in is installed. Go to the official Git download Website: Portal

If you have not installed Git, the command in CMD prompts you that git is not a valid command. Find the hard disk. In fact, it does not affect the installation of git.

After installing Git in Windows, configure the environment variables and add D: \ Program Files \ Git \ bin to the Path environment variable.

Installation Method

Yii2-detail-view

Official notes:

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.

This method is relative to the installation method in Linux, and Composer is used in Windows.

Run the command in CMD: composer require kartik-v/yii2-detail-view "*"


After the installation, we will see that the installation process, installed 5 Other plug-ins, these are dependent on the yii2-detail-view plug-ins,

This is the ease of use of the Composer tool. It automatically analyzes dependencies and helps us install the tool perfectly.

You can see the "kartik-v" directory under the webroot/appname/vendor directory. The directory contains six directories. The installation is successful.

The plug-in installation is here and how to use it. I will introduce it later in the learning process. Pai_^

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.