yii2 kartik-v/yii2-widgets installation

7 years, 6 months ago

Modified 1 year, 10 months ago

Viewed 3k times


I’d like to use kartik sidenav widget. I installed kartik-v/yii2-widgets extension via composer.

I can see it here: advanced\vendor\kartik-v\yii2-widget-sidenav and extensions.php has also been modified:

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

However, when I try to use it in my view,

use kartik\widgets\SideNav;

echo SideNav::widget([ 

It shows Class ‘kartik\widgets\SideNav’ not found error What is wrong ?

The doc clearly says it’s kartik\sidenav\SideNav and not kartik\widgets\SideNav.

1 Like

Thank Buddy for your reply.