create-prisma-php-app 1.8.18 → 1.8.19

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.
Files changed (2) hide show
  1. package/dist/bootstrap.php +10 -1
  2. package/package.json +1 -1
@@ -222,9 +222,16 @@ try {
222
222
  $contentToInclude = $result['path'] ?? '';
223
223
  $layoutsToInclude = $result['layouts'] ?? [];
224
224
  $pathname = $result['uri'] ? "/" . $result['uri'] : "/";
225
+ if (!empty($layoutsToInclude))
226
+ $isParentLayout = strpos($layoutsToInclude[0], 'src/app/layout.php') !== false;
227
+ else
228
+ $isParentLayout = false;
225
229
 
226
230
  ob_start();
227
231
  if (!empty($contentToInclude)) {
232
+ if (!$isParentLayout) {
233
+ require_once $contentToInclude;
234
+ }
228
235
  $childContent = ob_get_clean();
229
236
  for ($i = count($layoutsToInclude) - 1; $i >= 0; $i--) {
230
237
  $layoutPath = $layoutsToInclude[$i];
@@ -233,7 +240,9 @@ try {
233
240
  $childContent = ob_get_clean();
234
241
  }
235
242
 
236
- require_once $contentToInclude;
243
+ if ($isParentLayout) {
244
+ require_once $contentToInclude;
245
+ }
237
246
  $content = $childContent;
238
247
  } else {
239
248
  require_once 'not-found.php';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "1.8.18",
3
+ "version": "1.8.19",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",