Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How To Install Plugins in Cake PHP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 713
    Comment on it

    There are four ways to install a plugin in CakePHP->

    Plugin install through Composer Manually plugin install Plugin installed As Git Submodule By Git Cloning

    1- Manually To install a plugin manually in CakePHP, you just have to make a plugin folder into the directory app/Plugin/ folder. For example if youre installing a plugin named as XYZ then you should have a folder there in app/Plugin/ named xyz under which there should be the plugins View, Model, Controller and webroot and any other directories the plugins have.

    2-Composer First thing, if you are not familiar with this tool named "composer" then you can read about that. For example if you want to install the imaginary plugin XYZ through Composer, add it as dependency to your projects composer. json:

    {
    "require": {
    "cakephp/contact-manager": "1.2.*"
    }
    }
    

    Composer will install the plugin inside /Plugin directory, rather than in the usual folder.

    3-Git Clone

    If the plugin you want to install is hosted as a GitHub, you can also clone it in your cakePHP. For example-> Suppose there is a plugin XYZ is hosted on GitHub. You could clone it by executing the following command given below your app/Plugin/ folder:

    git clone git://github.com/cakephp/contact-manager.git XYZ

    4-Git Submodule

    If we want to install a plugin that is hosted as a Git, but if we do not want to clone it, we can also integrate it as a Git submoduleby executing following commands in your app folder: git submodule add git://github.com/cakephp/contact-manager.git Plugin/XYZ git submodule init git submodule update Enable the Plugin

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: