© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•16mo ago•
1 reply
Ibakha

Get Table Record in Livewire Component

Hi, I'm using a filament table in a livewire component. I'm trying to use a record of the table to pass an argument to a view, but my record is always returning the livewire class and not the table record. I made an infolist in the ViewAction to confirm if the data I can display the information of the selected record and I'm recovering the right information, but in this case, I'm using the view of an older project and I some information from the record for the api query.
Any idea?

Sorry in advance if the answer is obvious, I'm relatively new to laravel.
Thanks for the help!

Here's what I'm getting in the record:
Closure($record) {#2221 ▼ // app/ApiWrapper.php:16
  class: "App\Livewire\Stubs\ListStubs"
  this: App\Livewire\Stubs\ListStubs {#1075 …}
}
Closure($record) {#2221 ▼ // app/ApiWrapper.php:16
  class: "App\Livewire\Stubs\ListStubs"
  this: App\Livewire\Stubs\ListStubs {#1075 …}
}

And here's my table
    public function table(Table $table): Table
    {
        return $table
            ->query(Stub::query())
            ->columns([
                // ...
            ])
            ->filters([
                // ...
            ], layout: FiltersLayout::AboveContent)
            ->actions([
                // dd(fn (Stub $record) => dd($record)),
                ViewAction::make()
                    ->model(Stub::class)
                    ->view('forms.stub', ['employee' => ApiWrapper::getEmployeeStub(Auth::user()->id, fn ($record) => $record->stub_id)])
            ]);
    }
  
    public function table(Table $table): Table
    {
        return $table
            ->query(Stub::query())
            ->columns([
                // ...
            ])
            ->filters([
                // ...
            ], layout: FiltersLayout::AboveContent)
            ->actions([
                // dd(fn (Stub $record) => dd($record)),
                ViewAction::make()
                    ->model(Stub::class)
                    ->view('forms.stub', ['employee' => ApiWrapper::getEmployeeStub(Auth::user()->id, fn ($record) => $record->stub_id)])
            ]);
    }
  
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

Get record values in Livewire component with Filament Table
FilamentFFilament / ❓┊help
3y ago
Refresh table in livewire component
FilamentFFilament / ❓┊help
3y ago
Filament table in Livewire component!
FilamentFFilament / ❓┊help
2y ago
Filament table in Modal - livewire component
FilamentFFilament / ❓┊help
2y ago