38 lines
1.1 KiB
PHP
38 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Foundation\Application;
|
|
use Illuminate\Http\Request;
|
|
|
|
define('LARAVEL_START', microtime(true));
|
|
|
|
// Determine if the application is in maintenance mode...
|
|
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
|
|
require $maintenance;
|
|
}
|
|
|
|
// Register the Composer autoloader...
|
|
require __DIR__.'/../vendor/autoload.php';
|
|
|
|
// Allow the installer to run without a .env file.
|
|
if (!file_exists(__DIR__.'/../.env')) {
|
|
$tempKey = 'base64:'.base64_encode(random_bytes(32));
|
|
$_ENV['APP_KEY'] = $tempKey;
|
|
$_SERVER['APP_KEY'] = $tempKey;
|
|
$_ENV['DB_CONNECTION'] = 'sqlite';
|
|
$_SERVER['DB_CONNECTION'] = 'sqlite';
|
|
$_ENV['DB_DATABASE'] = ':memory:';
|
|
$_SERVER['DB_DATABASE'] = ':memory:';
|
|
$_ENV['SESSION_DRIVER'] = 'array';
|
|
$_SERVER['SESSION_DRIVER'] = 'array';
|
|
$_ENV['SESSION_DOMAIN'] = null;
|
|
$_SERVER['SESSION_DOMAIN'] = null;
|
|
$_ENV['SESSION_SECURE_COOKIE'] = false;
|
|
$_SERVER['SESSION_SECURE_COOKIE'] = false;
|
|
}
|
|
|
|
// Bootstrap Laravel and handle the request...
|
|
/** @var Application $app */
|
|
$app = require_once __DIR__.'/../bootstrap/app.php';
|
|
|
|
$app->handleRequest(Request::capture());
|