Welcome Guest, Not a member yet? Register   Sign In
Problem with CLI script routing or execution
#4

AFAIK, creating controllers and routes are not really necessary unless you want to expose some kind of RESTful service.


In my case I developed a bunch of 'Command's in App\Commands that can be run by both spark and any CRON job. It just works:

PHP Code:
<?php

namespace App\Commands;

use 
CodeIgniter\CLI\BaseCommand;
use 
CodeIgniter\CLI\CLI;
use 
App\Models\PageModel;

class 
AggregateBlogCategories extends BaseCommand
{
    protected $group      'Blog';
    protected $name      'blog:aggregate-categories';
    // the rest of the code 

CodeIgniter Wizard (CRUD code generator for Mac) instantly scaffolds Bootstrap-based web applications with an administrative interface (admin templates include Bootstrap5)

Reply


Messages In This Thread
RE: Problem with CLI script output - by warcooft - 04-22-2025, 07:10 AM
RE: Problem with CLI script routing or execution - by gosocial2 - 04-23-2025, 06:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB