#!/usr/bin/env php
<?php

use Symfony\Component\Console\Input\ArgvInput;
use Illuminate\Contracts\Console\Kernel as ConsoleKernelContract;

define('LARAVEL_START', microtime(true));

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on.
|
*/

require __DIR__.'/vendor/autoload.php';

$app = require_once __DIR__.'/bootstrap/app.php';

/*
|--------------------------------------------------------------------------
| Run The Artisan Application
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command may be
| executed inside this object. We'll pass in the class of the kernel
| so that we can use the methods it provides.
|
*/

$kernel = $app->make(ConsoleKernelContract::class);

$status = $kernel->handle(
    $input = new ArgvInput
);

$kernel->terminate($input, $status);

exit($status);
