I
I
Ilya Beloborodov2017-06-30 23:51:48
Yii
Ilya Beloborodov, 2017-06-30 23:51:48

Well, why is the class not found?

I create my first extantion, here it is https://packagist.org/packages/kowap/yii2-lightgallery
I do it composer require kowap/yii2-lightgallery, I paste the code

<?= \kowap\lightgallery\LightGalleryWidget::widget([
    'items' => $items,
    'options' => [
        'mode' => 'lg-slide-skew-ver-rev',
        'share' => true,
        'thumbnail' => true,
        'download' => false,
        'zoom' => false
    ]
]); ?>

and then bam 5ee19617b9bb40de823d4f5e714bd197.png
, what's wrong? my phpstorm does not swear, and goes to the class on click

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Fedorov, 2017-07-03
@kowap

In classes, you use the namespace kowap\light g allery and in composer.json (in autoload) - kowap\\light G allery\\ . These are different folders from the point of view of Linux ... correct this typo ...

A
Alex Bond, 2017-07-01
@AlexBond

And the code is not being executed on another server?) Run compsoer install on the server where the code is being executed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question