Answer the question
In order to leave comments, you need to log in
How to call controller in Yii2 widget?
Hello, I want to add my own controller to the widget and I don't understand how. Please help.
widget location in folder: app/components/Filter
controller location in folder: app/components/Filter/controllers/FilterController.php (namespace app\components\Filter\controllers;)
desired action in controller: actionSelectVars
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'enableStrictParsing' => false,
...
'rules' => [
...
'filter/select-vars' => 'components/Filter/filter/select-vars'
...
Answer the question
In order to leave comments, you need to log in
How to call a controller in a widget
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question