updated index and autoload

This commit is contained in:
Denis Duliçi 2022-07-10 00:19:28 +03:00
parent 7d62186292
commit 7921324fb8
2 changed files with 12 additions and 9 deletions

View File

@ -1,7 +1,7 @@
<?php <?php
// Define minimum supported PHP version // Define minimum supported PHP version
define('AKAUNTING_PHP', '7.3.0'); define('AKAUNTING_PHP', '8.0.2');
// Check PHP version // Check PHP version
if (version_compare(PHP_VERSION, AKAUNTING_PHP, '<')) { if (version_compare(PHP_VERSION, AKAUNTING_PHP, '<')) {
@ -16,8 +16,6 @@ if (version_compare(PHP_VERSION, AKAUNTING_PHP, '<')) {
die(1); die(1);
} }
define('LARAVEL_START', microtime(true));
// Load composer for core // Load composer for core
require __DIR__ . '/../vendor/autoload.php'; require __DIR__ . '/../vendor/autoload.php';
@ -25,7 +23,7 @@ require __DIR__ . '/../vendor/autoload.php';
foreach (glob(__DIR__ . '/../modules/*') as $folder) { foreach (glob(__DIR__ . '/../modules/*') as $folder) {
$autoload = $folder . '/vendor/autoload.php'; $autoload = $folder . '/vendor/autoload.php';
if (!is_file($autoload)) { if (! is_file($autoload)) {
continue; continue;
} }

View File

@ -7,19 +7,24 @@
* @link https://akaunting.com * @link https://akaunting.com
*/ */
define('LARAVEL_START', microtime(true));
// Check for maintenance
if (file_exists($maintenance = __DIR__ . '/storage/framework/maintenance.php')) {
require $maintenance;
}
// Register the auto-loader // Register the auto-loader
require(__DIR__ . '/bootstrap/autoload.php'); require __DIR__ . '/bootstrap/autoload.php';
// Load the app // Load the app
$app = require_once(__DIR__ . '/bootstrap/app.php'); $app = require_once __DIR__ . '/bootstrap/app.php';
// Run the app // Run the app
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle( $response = $kernel->handle(
$request = Illuminate\Http\Request::capture() $request = Illuminate\Http\Request::capture()
); )->send();
$response->send();
$kernel->terminate($request, $response); $kernel->terminate($request, $response);