How To Call A Model Or Class Using Custom Directory Path In Codeigniter 4 |
Read this: http://codeigniter.com/user_guide/cli/cli.html
You should create a controller for your cron jobs and make your routes accessible only via CLI. PHP Code: $routes->cli('tools/message/(:segment)', 'Tools::message/$1'); In your controller, check is_cli() to make sure it's not accessed by a browser. PHP Code: if ( ! is_cli()) {
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/ |
Messages In This Thread |
How To Call A Model Or Class Using Custom Directory Path In Codeigniter 4 - by cloudytechi147 - 09-22-2021, 05:50 AM
RE: How To Call A Model Or Class Using Custom Directory Path In Codeigniter 4 - by includebeer - 09-22-2021, 02:50 PM
RE: How To Call A Model Or Class Using Custom Directory Path In Codeigniter 4 - by iRedds - 09-24-2021, 11:33 PM
RE: How To Call A Model Or Class Using Custom Directory Path In Codeigniter 4 - by paliz - 09-25-2021, 10:31 AM
|