I have a controller in the console folder. How can I call this controller via ajax please?
I tried to config a route in Routes.php
, and then call this route by jquery Get()
function. But none of these below work...
'api/v0/hub-loader/<sheet_id:\d+>' => 'craftplugin/import-hubs/test',
'api/v0/hub-loader/<sheet_id:\d+>' => 'craftplugin/console/controllers/import-hubs/test',
'api/v0/hub-loader/<sheet_id:\d+>' => 'craftplugin/console/import-hubs/test',
All these routes return 404 page not found error