PHP code example of queents / console-helpers

1. Go to this page and download the library: Download queents/console-helpers library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

queents / console-helpers example snippets


use Queents\ConsoleHelpers\Traits\RunCommand;

class MyCommand extends Command{
    use RunCommand;
}

$this->phpCommand('echo "welcome";');

use Queents\ConsoleHelpers\Traits\RunCommand;

class MyCommand extends Command{
    use RunCommand;
}

$this->yarnCommand('echo "welcome";');

use Queents\ConsoleHelpers\Traits\RunCommand;

class MyCommand extends Command{
    use RunCommand;
}

$this->artisanCommand('migrate');

use Queents\ConsoleHelpers\Traits\HandleStubs;

class MyCommand extends Command{
    use HandleStubs;
}

$this->generateStubs(
    __DIR__ . "/stubs/SettingsClass.stub",
    "Modules/Base/Settings/MainSettings.php",
    [
        "settingName" => "site_url",
        "moduleName" => "Base",
        "settingField" => Str::lower("site_url")
    ],
    [
        "Modules/Base/Settings/"
    ]
);

use Queents\ConsoleHelpers\Traits\HandleModules;

class MyCommand extends Command{
    use HandleModules;
}

$this->activeAllModules();

$this->stopAllModules();

$this->activeModule("Base");