create-prisma-php-app 1.19.2 → 1.19.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bootstrap.php +9 -7
- package/package.json +1 -1
package/dist/bootstrap.php
CHANGED
|
@@ -200,8 +200,8 @@ function findGroupFolder($uri): string
|
|
|
200
200
|
|
|
201
201
|
function dynamicRoute($uri)
|
|
202
202
|
{
|
|
203
|
-
global $_filesListRoutes;
|
|
204
|
-
|
|
203
|
+
global $_filesListRoutes, $dynamicRouteParams;
|
|
204
|
+
|
|
205
205
|
$uriMatch = null;
|
|
206
206
|
$normalizedUri = ltrim(str_replace('\\', '/', $uri), './');
|
|
207
207
|
$normalizedUriEdited = "src/app/$normalizedUri";
|
|
@@ -522,18 +522,20 @@ function wireCallback()
|
|
|
522
522
|
|
|
523
523
|
function getLoadingsFiles()
|
|
524
524
|
{
|
|
525
|
-
global $_filesListRoutes;
|
|
525
|
+
global $_filesListRoutes, $uri, $pathname, $dynamicRouteParams, $params;
|
|
526
526
|
|
|
527
527
|
$loadingFiles = array_filter($_filesListRoutes, function ($route) {
|
|
528
528
|
$normalizedRoute = str_replace('\\', '/', $route);
|
|
529
|
-
|
|
530
|
-
return $isLoadingFile;
|
|
529
|
+
return preg_match('/\/loading\.php$/', $normalizedRoute);
|
|
531
530
|
});
|
|
532
531
|
|
|
533
|
-
$haveLoadingFileContent = array_reduce($loadingFiles, function ($carry, $route) {
|
|
532
|
+
$haveLoadingFileContent = array_reduce($loadingFiles, function ($carry, $route) use ($uri, $pathname, $dynamicRouteParams, $params) {
|
|
534
533
|
$normalizeUri = str_replace('\\', '/', $route);
|
|
535
534
|
$fileUrl = str_replace('./src/app', '', $normalizeUri);
|
|
536
|
-
|
|
535
|
+
|
|
536
|
+
ob_start();
|
|
537
|
+
include($route); // This will execute the PHP code in loading.php
|
|
538
|
+
$content = ob_get_clean();
|
|
537
539
|
|
|
538
540
|
if ($content !== false) {
|
|
539
541
|
$url = $fileUrl === '/loading.php' ? '/' : str_replace('/loading.php', '', $fileUrl);
|