<?php
// Upload to public/, hit it once in browser, then DELETE immediately.
define('LARAVEL_START', microtime(true));
require __DIR__ . '/../vendor/autoload.php';
$app = require __DIR__ . '/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);

$commands = [
    'route:clear',
    'config:clear',
    'cache:clear',
    'view:clear',
];

foreach ($commands as $cmd) {
    $kernel->call($cmd);
    echo "<b>{$cmd}</b>: " . nl2br(htmlspecialchars($kernel->output())) . "<br>";
}
echo "<br><b style='color:red'>DELETE this file now.</b>";
