<?php

use Illuminate\Http\Request;

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

// /v2 prefix kaldır
$_SERVER["REQUEST_URI"] = preg_replace("#^/v2#", "", $_SERVER["REQUEST_URI"] ?? "/");
if (empty($_SERVER["REQUEST_URI"])) {
    $_SERVER["REQUEST_URI"] = "/";
}

if (file_exists($maintenance = __DIR__."/../v2_app/storage/framework/maintenance.php")) {
    require $maintenance;
}

require __DIR__."/../v2_app/vendor/autoload.php";

(require_once __DIR__."/../v2_app/bootstrap/app.php")
    ->handleRequest(Request::capture());
