I'm a total Craft newbie, so I hope this question isn't ridiculous.

I just want to see a controller / action work in my new module.

I have src/controllers/ScrapeController.php as such:


namespace mycompany\mymodule\controllers;

use craft\web\Controller;

class ScrapeController extends Controller {

    public function actionPush()
        return $this->asJson([
            'success' => TRUE,

And I just want to see this URL work: http://localhost/my-module/scrape/push

But instead I get: HTTP 404 - Template not found

I'm sure I'm missing something really dumb here. Any ideas?

1 Answer 1


You'll either need to use the action url http://localhost/actions/my-module/scrape/push since only those will route to controllers by default or create a custom route to your controller


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.