Ads 4 You

Install Yii2 extension manually without using Composer

Email Id : phpmk888@gmail.com

how to install extension in yii2 framework?


https://github.com/kartik-v/yii2-widget-fileinput

But if you want to do it manually:


 

1) Download archive of needed version from Github.

2) Open composer.json. add to the require section of your composer.json file. ["kartik-v/yii2-widget-fileinput": "*"]

3) Find PSR-4 autoload section and remember it, in your case: kartik/select2.

4) Extract files to corresponding folder in vendor: vendor/kartik/select2 (not yiisoft!).

5) Add to vendor/composer/autoload_psr4.php:
 'kartik-v\\yii2-widget-fileinput\\' => array($vendorDir . '/kartik-v/yii2-widget-fileinput'),
6) Add to vendor/yiisoft/extensions.php:

'kartik-v/yii2-widget-fileinput' =>
    array(
        'name' => 'kartik-v/yii2-widget-fileinput',
        'version' => '9999999-dev',
        'alias' =>
        array(
            '@kartik/file' => $vendorDir . '/kartik-v/yii2-widget-fileinput',
        ),
    ),
   
7)


 'contact-form']); ?>
field($model, 'name')->widget(FileInput::classname(), [
    'options' => ['accept' => 'image/*'],
]);
?>    

Comments

  1. Nice blog...Very useful information is providing by ur blog..here is a way to find.
    Hire Remote Yii Framework Team in India

    ReplyDelete

Post a Comment