© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
Jacko

Filament Fabricator, return object from select field

Hey, I'm new to Filament/Laravel so sorry for the noob Q - I'm trying to create a CMS type back-end for a website. I have a model called "Machine" and each machine should be capable of having an associated public page. Is there a way in fabricator to return a machine object to the blade file, as opposed to just the ID, when using a select field in the block with all machines listed.

return Block::make('machine')
        ->schema([
            TextInput::make('name'),
            Select::make('machine_id')
                ->label('Machine')
                ->options(\App\Models\Machine::pluck('name', 'id')->toArray())
        ]);
return Block::make('machine')
        ->schema([
            TextInput::make('name'),
            Select::make('machine_id')
                ->label('Machine')
                ->options(\App\Models\Machine::pluck('name', 'id')->toArray())
        ]);


$machineId
$machineId
works in the block template but I want to have access to the full machine object.

Thanks
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

Filament Fabricator dynamic route challenge
FilamentFFilament / ❓┊help
2y ago
Filament Select Field Option Display Issue
FilamentFFilament / ❓┊help
11mo ago
Filament Action: Select field value missing from $data when using multiple()
FilamentFFilament / ❓┊help
5mo ago
filament-fabricator with spatie-laravel-translatable-plugin
FilamentFFilament / ❓┊help
16mo ago