Skip to content

Commit aa22ffb

Browse files
authored
Tweak page prop access in layouts and blocks
1 parent e016193 commit aa22ffb

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

resources/views/components/layouts/base.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@props([
2+
'page',
23
'title' => null,
34
'dir' => 'ltr',
45
])

resources/views/components/page-blocks.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* @var class-string<\Z3d0X\FilamentFabricator\PageBlocks\PageBlock> $blockClass
1010
*/
11-
$blockClass = FilamentFabricator::getPageBlockFromName($blockType);
11+
$blockClass = \Z3d0X\FilamentFabricator\Facades\FilamentFabricator::getPageBlockFromName($blockType);
1212
1313
if (!empty($blockClass) && $page !== null) {
1414
$blockClass::preloadRelatedData($page, $group);

stubs/LayoutView.stub

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@props(['page'])
2-
<x-filament-fabricator::layouts.base :title="$page->title">
2+
<x-filament-fabricator::layouts.base :page="$page" :title="$page->title">
33
{{-- Header Here --}}
44

55
<x-filament-fabricator::page-blocks :blocks="$page->blocks" />
66

77
{{-- Footer Here --}}
8-
</x-filament-fabricator::layouts.base>
8+
</x-filament-fabricator::layouts.base>

0 commit comments

Comments
 (0)