File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/realtime-compiler/src/Concerns Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 66use Illuminate \Foundation \Application ;
77
88/**
9- * Provides methods to interact with the Laravel (Hyde)
10- * application instance. This is needed to bootstrap
11- * core Hyde services, for example page compilers.
9+ * Provides methods to interact with the Laravel (Hyde) application instance.
10+ * This is needed to bootstrap core Hyde services, for example page compilers.
11+ *
12+ * The application is lazy-loaded and only booted when necessary as it takes ~80ms.
13+ * This is so routes that don't need the application don't suffer the performance hit.
1214 */
1315trait InteractsWithLaravel
1416{
1517 protected Application $ laravel ;
1618
1719 protected function createApplication (): void
1820 {
19- $ this ->laravel = require_once BASE_PATH .'/app/bootstrap.php ' ;
21+ $ this ->laravel = require BASE_PATH .'/app/bootstrap.php ' ;
2022 }
2123
2224 protected function bootApplication (): void
You can’t perform that action at this time.
0 commit comments