© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
24 replies
Becker Maxime

Update repeater

https://flareapp.io/share/VmeWKgz7
SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'where clause'
update
  `artist_lead`
SET
  `artist_id` = 16,
  `artist_lead`.`updated_at` = 2023 -10 -27 13: 50: 46
WHERE
  `` = 15
  AND `` = 15
SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'where clause'
update
  `artist_lead`
SET
  `artist_id` = 16,
  `artist_lead`.`updated_at` = 2023 -10 -27 13: 50: 46
WHERE
  `` = 15
  AND `` = 15

Repeater::make('leadArtists')
    ->required()
    ->relationship()
    ->label(__('lead-resource.repeater.field.artists'))
    ->schema([
        Forms\Components\Select::make('artist_id')
            ->searchable()
            ->relationship('artist', 'name')
            ->getSearchResultsUsing(fn(string $search): array => Artist::where('name', 'like', "{$search}%")
                ->orWhere('first_name', 'like', "{$search}%")
                ->orWhere('zip_code', 'like', "{$search}%")
                ->select('id', 'name', 'first_name', 'zip_code')
                ->limit(50)
                ->get()
                ->mapWithKeys(fn($artist) => [$artist->id => "{$artist->first_name} {$artist->name} - {$artist->zip_code}"])
                ->toArray())
            ->getOptionLabelUsing(function ($value): ?string {
                $artist = Artist::find($value);
                return "{$artist->first_name} {$artist->name} - {$artist->zip_code}";
            })
            ->label(__('lead-resource.repeater.field.name'))
            ->columnSpan(2),
Repeater::make('leadArtists')
    ->required()
    ->relationship()
    ->label(__('lead-resource.repeater.field.artists'))
    ->schema([
        Forms\Components\Select::make('artist_id')
            ->searchable()
            ->relationship('artist', 'name')
            ->getSearchResultsUsing(fn(string $search): array => Artist::where('name', 'like', "{$search}%")
                ->orWhere('first_name', 'like', "{$search}%")
                ->orWhere('zip_code', 'like', "{$search}%")
                ->select('id', 'name', 'first_name', 'zip_code')
                ->limit(50)
                ->get()
                ->mapWithKeys(fn($artist) => [$artist->id => "{$artist->first_name} {$artist->name} - {$artist->zip_code}"])
                ->toArray())
            ->getOptionLabelUsing(function ($value): ?string {
                $artist = Artist::find($value);
                return "{$artist->first_name} {$artist->name} - {$artist->zip_code}";
            })
            ->label(__('lead-resource.repeater.field.name'))
            ->columnSpan(2),


why my fields are empty ?
Flare
SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'where clause' (Connection: mysql, SQL: update
artist_lead
artist_lead
set
artist_id
artist_id
= 16,
artist_lead
artist_lead
.
updated_at
updated_at
= 2023-10-27 14:48:13 where
 = 15 and 
 = 15 and 
= 15) - The error occurred at http://localhost/admin/leads/15/edit
Solution
Just @ me if you need more help. This stuff can be confusing.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Update Repeater
FilamentFFilament / ❓┊help
3y ago
Problem update repeater Unknown column
FilamentFFilament / ❓┊help
3y ago
Update other table from repeater.
FilamentFFilament / ❓┊help
3y ago
Update each repeater field 2 fields outside the repeater
FilamentFFilament / ❓┊help
2y ago