viloveul / console
Viloveul Console Application based on Symfony Console
Installs: 158
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/viloveul/console
Requires
- php: ~7.0
- symfony/console: ~3.4|~4.0
- viloveul/config: v1.*|v1.x-dev
- viloveul/container: v1.*|v1.x-dev
Requires (Dev)
- viloveul/support: v1.*|v1.x-dev
README
make sure your php version > 7.0
composer require viloveul/console
HOW
require __DIR__ . '/vendor/autoload.php'; class MyCommand extends Viloveul\Console\Command { public function handle() { $this->writeNormal('Hello World'); $this->writeInfo('Hello World'); $this->writeError('Hello World'); $this->writeQuestion('Hello World'); $this->writeComment('Hello World'); } } $console = new Viloveul\Console\Console(); $console->boot(); // add command $cmd = new MyCommand("hello"); $console->add($cmd); // run $console->run();
then
$ php your-file hello