© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
ouch

Many to Many in Tables in livewire component

Hey guys I'm newbie in filament and livewire and I'm confused with relationships.
I have filament tables as stand alone package on livewire without panel, and i have a problem with many to many relationship Order >--< Status, and I want to use SelectColumn.

And I'm confused how to make it work. Because i dont use panel so i can't create realation ship manager correct?

Model Order
    public function statuses(): BelongsToMany
    {
        return $this->belongsToMany(
            Status::class,
            'order_status',
            'order_id',
            'status_id'
        )->withTimestamps();
    }
    public function statuses(): BelongsToMany
    {
        return $this->belongsToMany(
            Status::class,
            'order_status',
            'order_id',
            'status_id'
        )->withTimestamps();
    }

Inside table - I know that it does not get last element but honestly I'm lost now.
SelectColumn::make('statuses.name')
            ->label('Stav')
            ->options(Status::pluck('name')
            ->toArray())
SelectColumn::make('statuses.name')
            ->label('Stav')
            ->options(Status::pluck('name')
            ->toArray())
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

Colors and Froms/Tables in livewire component?
FilamentFFilament / ❓┊help
3y ago
multiple tables in the same livewire component
FilamentFFilament / ❓┊help
3y ago
Services and filament tables livewire component
FilamentFFilament / ❓┊help
2y ago
Livewire component with tables and form
FilamentFFilament / ❓┊help
2y ago