© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago
Panos.S

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
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Custom blade view during create
FilamentFFilament / ❓┊help
2y ago
How to access current model in custom view page
FilamentFFilament / ❓┊help
3y ago
Custom model attributes in model
FilamentFFilament / ❓┊help
2y ago
Custom view page and display for relation model
FilamentFFilament / ❓┊help
3y ago