File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,16 @@ APP_RUNTIME=Runtime\Laravel\Runtime
24
24
25
25
use Illuminate\Contracts\Http\Kernel;
26
26
27
+ define('LARAVEL_START', microtime(true));
28
+
27
29
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
28
30
29
- return function () {
30
- define('LARAVEL_START', microtime(true));
31
- $app = require_once __DIR__ . '/../bootstrap/app.php';
31
+ return function (): Kernel {
32
+ static $app;
33
+
34
+ if (null === $app) {
35
+ $app = require dirname(__DIR__).'/bootstrap/app.php';
36
+ }
32
37
33
38
return $app->make(Kernel::class);
34
39
};
@@ -41,13 +46,17 @@ return function () {
41
46
42
47
use Illuminate\Contracts\Console\Kernel;
43
48
49
+ define('LARAVEL_START', microtime(true));
50
+
44
51
require_once __DIR__.'/vendor/autoload_runtime.php';
45
52
46
- return function () {
47
- define('LARAVEL_START', microtime(true));
48
- $app = require_once __DIR__.'/bootstrap/app.php';
53
+ return function (): Kernel {
54
+ static $app;
55
+
56
+ if (null === $app) {
57
+ $app = require __DIR__.'/bootstrap/app.php';
58
+ }
49
59
50
60
return $app->make(Kernel::class);
51
61
};
52
-
53
62
```
You can’t perform that action at this time.
0 commit comments