Skip to content

Commit

Permalink
Small bug fix in admin panel
Browse files Browse the repository at this point in the history
  • Loading branch information
GeniJaho committed Mar 18, 2024
1 parent f936360 commit f0bb64c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Filament/Resources/PhotoResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public static function table(Table $table): Table
->sortable(),
ImageColumn::make('full_path')
->label('Photo')
->searchable(),
->searchable(query: function (Builder $query, string $search): Builder {
return $query->where('path', 'like', "%{$search}%");
}),
TextColumn::make('gps')
->label('GPS')
->getStateUsing(fn (Photo $photo): ?string => $photo->latitude && $photo->longitude
Expand Down

0 comments on commit f0bb64c

Please sign in to comment.