<?php

use Illuminate\Foundation\Application;
use Illuminate\Http\Request;

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

/*
|--------------------------------------------------------------------------
| cPanel public_html front controller
|--------------------------------------------------------------------------
|
| Use this file when the Laravel application folder is placed outside
| public_html, for example:
|
| /home/cpaneluser/microfinance-saas
| /home/cpaneluser/public_html/index.php
|
| Copy this file to public_html/index.php and update $appPath if needed.
|
*/

$appPath = __DIR__.'/../microfinance-saas';

if (file_exists($maintenance = $appPath.'/storage/framework/maintenance.php')) {
    require $maintenance;
}

require $appPath.'/vendor/autoload.php';

/** @var Application $app */
$app = require_once $appPath.'/bootstrap/app.php';

$app->handleRequest(Request::capture());
