<?php
require __DIR__ . '/vendor/autoload.php';
$app = require __DIR__ . '/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);

$path = $argv[1] ?? '/';
$method = $argv[2] ?? 'GET';

$request = Illuminate\Http\Request::create($path, $method);
$response = $kernel->handle($request);

echo $response->getStatusCode() . "\n";
echo $response->getContent() . "\n";

$kernel->terminate($request, $response);
