© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
16 replies
Shiv

how to access current record in form function of Resource file

class OrderResource extends Resource
{
    protected static ?string $model = Order::class;

    protected static ?string $navigationIcon = 'heroicon-o-collection';

    public static function form(Form $form): Form
    {
        $model = ?? //How can i access the current model here?

        return $form->schema([ ]);
    }
}
class OrderResource extends Resource
{
    protected static ?string $model = Order::class;

    protected static ?string $navigationIcon = 'heroicon-o-collection';

    public static function form(Form $form): Form
    {
        $model = ?? //How can i access the current model here?

        return $form->schema([ ]);
    }
}
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

Access $record in resource
FilamentFFilament / ❓┊help
2y ago
Repeater access current $record
FilamentFFilament / ❓┊help
3y ago
Access record in form method
FilamentFFilament / ❓┊help
3y ago
Create record function in filament resource
FilamentFFilament / ❓┊help
2y ago