Create custom resource view blade page and access model attributes

Hello, I am trying to build a custom blade page that will act as a view page of my Classified resource. This is my view-classified.blade.php:
<x-filament-panels::page>
<x-filament::section>
<x-slot name="heading">
Classified Details
</x-slot>

{{-- Content --}}
<div>

<h2>{{ $record->make }}</h2>
<p>{{ $record->model }}</p>
<p>{{ $record->fuel_type }}</p>
<!-- Access other properties as needed -->
</div>
</x-filament::section>
</x-filament-panels::page>
<x-filament-panels::page>
<x-filament::section>
<x-slot name="heading">
Classified Details
</x-slot>

{{-- Content --}}
<div>

<h2>{{ $record->make }}</h2>
<p>{{ $record->model }}</p>
<p>{{ $record->fuel_type }}</p>
<!-- Access other properties as needed -->
</div>
</x-filament::section>
</x-filament-panels::page>
I have registered the page in the resource but I can't see how to access the model's attributes and I get the error: Undefined variable $record when trying to access the page
0 Replies
No replies yetBe the first to reply to this messageJoin