wilkques / console
Installs: 121
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/wilkques/console
Requires
- php: >=5.5
- league/climate: >=3.2.4
- wilkques/container: >=4.0.0
- wilkques/filesystem: >=1.0.1
- wilkques/php-helper: >=5.14.0
README
composer require wilkques/console
How to use
-
Add PHP command file (path default ./Console)
<?php use Wilkques\Console\Command; class DoSomethingCommand extends Command { /** * signature * * @var string */ public $signature = "do:something {--debug=false: debug mode (default false)} {--list=false: get list (default false)}"; /** * description * * @var string */ public $description = "do something"; /** * handle this command */ public function handle() { // do something } }
-
in terminal run
vi artisan
& Add PHP coderequire_once 'vendor/autoload.php'; $command = $argv; array_shift($command); console() ->setCommandRootPath("<set console dir path>") // if you want change path ->setComposerPath("<composer.json path>") // if you want change ->boot() ->handle($command);
-
in terminal run
php artisan do:something --debug=true