Learn YII2 framework from scratch (ii) installing extensions via Composer, yii2composer_php tutorial

Source: Internet
Author: User
Tags composer install

Learn YII2 framework from scratch (ii) Install the extension via Composer, Yii2composer


At present, the expansion of YII2 is not many, as of today, a total of 33 on the official website, but there are no lack of these plugins have excellent extension plug-ins,

I tried a few, found a series of good YII2 plug-ins, the author is from India's Krajee team, they write plug-ins are very useful. Recommend.

Krajee team's website: http://krajee.com, there are a few nice plugins you can try.

The following is an introduction to the YII2 plug-in installation method. Install the plug-in Yii2-detail-view via composer.

Git

Recommended install Git,composer install plug-in when you use git clone,git official download website: Portal

If you have not installed the Git,cmd Execute command, you will be prompted that git is not a valid command. Then go for the hard drive download address. It doesn't really matter if you don't install Git.

After installing Git under Windows, configure the environment variable, and add the D:\Program files\git\bin to the PATH environment variable.

Installation method

Yii2-detail-view

Official Note:

Installation the preferred-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 is a method of installation relative to the Linux environment, which is used under Windows composer

CMD execution command: Composer require kartik-v/yii2-detail-view "*"


Installation is complete, we will see the installation process, installed 5 other plug-ins, these are related to the Yii2-detail-view has a dependency on the plug-in,

This is where the composer tool works, automating the analysis of dependencies and helping us to install them perfectly.

See the "kartik-v" directory under the Webroot/appname/vendor directory. See 6 directories stored under the path. Indicates that the installation was successful.

Plug-in installation is here, as to how to use. Later in the study process. ^_^


Yii2 in the use of composer installation, the following error occurred, the hero Help, ...

You PHP does not open MongoDB extension ~ ~ ~ and composer It's okay

Open your php.ini to turn on MongoDB extension (remove the ";" number from the front)

Restart your server (Apache, IIS ...). )

and try again.

If it's a Linux system, I don't know, you search for it.


http://www.bkjia.com/PHPjc/866660.html www.bkjia.com true http://www.bkjia.com/PHPjc/866660.html techarticle from the beginning of the YII2 Framework (ii) through the Composer installation extension, yii2composer the current YII2 expansion is not many, as of today, in the official website a total of 33, but these plugins ...

  • 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.