Action URLs from CP to a Craft 3 plugin controller I'm working on my first Craft 3 plugin and want to add some buttons to my plugin's control panel section which post form data to a controller.

My plugin is called 'myplugin', the controller I wish to post to is called 'products' and the method in that controller is 'get-products'. I figured I should therefore create the URL on the forms as 

{{ actionUrl('products/get-products') }}


However this yields a 404 error

HTTP 404 – Not Found – yii\web\NotFoundHttpException
Page not found.
↵
Caused by: Invalid Route – yii\base\InvalidRouteException
Unable to resolve the request "https:/local.mydomain.co.uk/index.php?p=admin/actions/products/get-products".
in /Users/pete/projects/myclient/dev/build/vendor/yiisoft/yii2/base/Module.php at line 537


If I call the URL directly by using https://local.mydomain.co.uk/admin/actions/myplugin/products/get-products then it behaves as expected.

Obviously I'm missing some really important bit of knowledge here and would love if someone could help me understand what's going on.
I think you should use {{ actionUrl('myplugin/products/get-products') }}.

But in a form, it's maybe even better/easier to use:

&lt;input type="hidden" name="action" value="myplugin/products/get-products" /&gt;