I downloaded the yii2-jui in this link
After that I put it under yiisoft folder
yiisoft\yii2-jui
when I run my application it gives me this error
PHP Fatal Error – yii\base\ErrorException Class 'yii\jui\DatePicker' not found
How can I fixed this.where should I put the yii2-jui folder ?
Thank you in advance
Stop creating duplicate questions.
And you do not just download something and copy it in a folder. Use composer to install it. the Yii2 that you copied is just a shell, you have to use composer to install the rest of it. Composer does more then just copy the files it creates an autoloader that tells yii where everything is.
Insert this in the view:
use yii\jui\DatePicker;
The best way is: run: php composer.phar require --prefer-dist yiisoft/yii2-jui "*" in your project
insert code:
'yiisoft/yii2-jui' =>
array (
'name' => 'yiisoft/yii2-jui',
'version' => '2.0.2',
'alias' =>
array (
'@yii/jui' => $vendorDir . '/yiisoft/yii2-jui',
),
),
in yiisoft/extensions.php file
I fixed the problem when I ran sudo composer require --prefer-dist yiisoft/yii2-jui
"*" ONLY IN FOLDER basic
, where are web
, yii
, models
and etc.