简体   繁体   中英

Install highcharts extenion in yii2 manualy [without composer]

Step 1:Downloaded highcharts extension and extract it in /vendor/miloschuman/highcharts Step 2: added following code in extension .php

    'miloschuman/highcharts' => array (
    'name' => 'miloschuman/highcharts',
    `enter code here`   'version' => '4',
    'alias' => array (
        '@miloschuman/highcharts' => $vendorDir . 'miloschuman/highcharts',
    ),
   ),

step3: added code in autoload_psr4.php

'miloschuman\\highcharts\\' => array($vendorDir . '/miloschuman/highcharts'),

Step 4 :in view

use miloschuman\highcharts\Highcharts;

but getting error

Class 'miloschuman\\highcharts\\Highcharts' not found

You are missing /src when editing autoload_psr4.php

'miloschuman\\highcharts\\' => array($vendorDir . '/miloschuman/highcharts/src'),

Please visit https://github.com/miloschuman/yii2-highcharts
It worked fine for me. Hope this work fine for you also.
You can download the ZIP file and follow the process accordingly as given in the link.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM