#!/usr/bin/env php
<?php

use Illuminate\Contracts\Console\Kernel;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\ConsoleOutput;

define('LARAVEL_START', microtime(true));

require __DIR__ . '/vendor/autoload.php';

/*
|--------------------------------------------------------------------------
| Bootstrap The Application
|--------------------------------------------------------------------------
|
| Create the application instance (the IoC container) and bootstrap it.
|
*/

$app = require_once __DIR__ . '/bootstrap/app.php';

/*
|--------------------------------------------------------------------------
| Run The Console Kernel
|--------------------------------------------------------------------------
|
| Grab an instance of the console kernel from the container and run it to
| handle the incoming CLI input and produce output. Then terminate.
|
*/

$kernel = $app->make(Kernel::class);

$status = $kernel->handle(
    $input = new ArgvInput(),
    new ConsoleOutput()
);

$kernel->terminate($input, $status);

exit($status);
