public function callArtisan($command, $parameters = [], OutputInterface $output = null)
    {
        $console = $this->app->make('Illuminate\Contracts\Console\Kernel');
        if (!$output) {
            $console->call($command, $parameters);
            $output = trim($console->output());
            $this->debug($output);
            return $output;
        }
        
        $console->call($command, $parameters, $output);
    }
public function callArtisan($command, $parameters = [], OutputInterface $output = null)
    {
        $console = $this->app->make('Illuminate\Contracts\Console\Kernel');
        if (!$output) {
            $console->call($command, $parameters);
            $output = trim($console->output());
            $this->debug($output);
            return $output;
        }
        
        $console->call($command, $parameters, $output);
    }
public function callArtisan ( $ command , $ parameters = [ ] , OutputInterface $ output = null ) { $ console = $ this -> app -> make ( 'Illuminate\Contracts\Console\Kernel' ) ; if ( ! $ output ) { $ console -> call ( $ command , $ parameters ) ; $ output = trim ( $ console -> output ( ) ) ; $ this -> debug ( $ output ) ; return $ output ; } $ console -> call ( $ command , $ parameters , $ output ) ; }
Call an Artisan command.

``` php
<?php
$I->callArtisan('command:name');
$I->callArtisan('command:name', ['parameter' => 'value']);
```
Use 3rd parameter to pass in custom `OutputInterface`

@param string $command
@param array $parameters
@param OutputInterface $output
@return string
Call an Artisan command .