create-prisma-php-app 1.8.17 → 1.8.18

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.
@@ -223,17 +223,23 @@ try {
223
223
  $layoutsToInclude = $result['layouts'] ?? [];
224
224
  $pathname = $result['uri'] ? "/" . $result['uri'] : "/";
225
225
 
226
+ ob_start();
226
227
  if (!empty($contentToInclude)) {
227
- foreach ($layoutsToInclude as $layoutPath) {
228
+ $childContent = ob_get_clean();
229
+ for ($i = count($layoutsToInclude) - 1; $i >= 0; $i--) {
230
+ $layoutPath = $layoutsToInclude[$i];
231
+ ob_start();
228
232
  require_once $layoutPath;
233
+ $childContent = ob_get_clean();
229
234
  }
230
235
 
231
236
  require_once $contentToInclude;
237
+ $content = $childContent;
232
238
  } else {
233
- require_once "not-found.php";
239
+ require_once 'not-found.php';
240
+ $notFound = ob_get_clean();
234
241
  }
242
+ $content .= ob_get_clean();
235
243
  } catch (Throwable $e) {
236
244
  echo "<div class='error'>An error occurred: " . $e->getMessage() . "</div>";
237
245
  }
238
-
239
- $content = ob_get_clean();
@@ -15,6 +15,13 @@
15
15
  </head>
16
16
 
17
17
  <body>
18
+ <!-- don't place any HTML content here. This section is reserved to show the notFound content. -->
19
+ <?php if (isset($notFound)) {
20
+ echo $notFound;
21
+ exit;
22
+ } ?>
23
+
24
+ <!-- Additional HTML content can go here. -->
18
25
  <?php echo $content; ?>
19
26
  <!-- Additional HTML content can go here. -->
20
27
  </body>
@@ -5,7 +5,7 @@
5
5
  Sorry, we couldn't find the page you're looking for.
6
6
  </p>
7
7
  </div>
8
- <a class="inline-flex h-10 items-center justify-center rounded-md border border-gray-200 bg-white px-8 text-sm font-medium shadow-sm transition-colors hover:bg-gray-100 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-gray-950 disabled:pointer-events-none disabled:opacity-50 dark:border-gray-800 dark:bg-gray-950 dark:hover:bg-gray-800 dark:hover:text-gray-50 dark:focus-visible:ring-gray-300" href="#">
8
+ <a class="inline-flex h-10 items-center justify-center rounded-md border border-gray-200 bg-white px-8 text-sm font-medium shadow-sm transition-colors hover:bg-gray-100 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-gray-950 disabled:pointer-events-none disabled:opacity-50 dark:border-gray-800 dark:bg-gray-950 dark:hover:bg-gray-800 dark:hover:text-gray-50 dark:focus-visible:ring-gray-300" href="/">
9
9
  Go to Homepage
10
10
  </a>
11
11
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "1.8.17",
3
+ "version": "1.8.18",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",