Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] CLI command from modules folder

(This post was last modified: 08-09-2021, 08:02 AM by superior.)


I'm trying to run a CLI command through the modules directory:

- project
-- app
-- modules
--- Calendar
---- Controllers
----- Calendar.php

Added the route inside the modules config, did this by using $routes->cli('cron/reminders', 'Calendar:: sendReminders');. (space is to prevent it turning into a smiley on this forum)
But for some reason i'm not getting any response from this, are there some additional requirements to get this running?

The Routes.php does have a ['namespace' => '\Modules\Calendar\Controllers'] other links with get() and post() are working this way.

When creating the task as a get() i can access it through the browser, but the command line is still empty. My first thought is it isn't loaded maybe someone could verify this?

Found out the reason, it's because the Filter for authentication prevents it. Added an except rule and now it's working again.

Theme © iAndrew 2016 - Forum software by © MyBB