Yii2 Class not found. how to fix?

Loaded widget through composer with github . The widget was located in the vendor folder
f464c6a9e2bb46fb8e41eb2476a3e4de.jpg
When you try to connect the widget gives an error
Class 'vkolya\poll\myPoll' not found
Here's the code of the widget
use vkolya\poll\myPoll;

echo myPoll::widget([
 'visualization' => 'PieChart',
 'pullName' => 'yoasdu wanna Do ?',

'answerOptions'=>
[

'yesasddfs',
'sdnsdfo',
'masdysdfbe',

],
 'diagrammsOptions' => array(title => 'My Dailsdy Activity',
 height => 300,
 width => 450,

),
])


Class myPoll
namespace vkolya\poll;

myPoll class extends Widget {
 //some code..
 }

The editor code, see this class , successful it becomes , but the browser complains . What's the matter ?
August 19th 19 at 23:34
1 answer
August 19th 19 at 23:36
Solution
d4be6112ff3e4670afb4ee6b2897e7c1.png

here if I'm not mistaken, the path must correspond to a namespace.
"psr-4": { "vkolya\\poll\\": "" }
yeah , that's the point . Very grateful - zelda.Casper28 commented on August 19th 19 at 23:39
: look here - https://getcomposer.org/doc/04-schema.md#psr-4read it, if you want a different structure to do - solon_Herman commented on August 19th 19 at 23:42

Find more questions by tags PHPYii