Skip to content

Development: Build a Console Command ΒΆ

  • Create console-commands/myproject/mycommand.php
  • Example content:
    <?php
    
    echo "Hello ".Site::$title;
    
    dump($_COMMAND);
    
    $_COMMAND['LOGGER']->warning('Danger Will Robinson!');
    
  • Update site:
    update-site
    
  • Run command:
    console-run myproject:mycommand --foo "bar"