Error when i search in table
I got this error when i search in the table i am using filament-spatie-translatable plugin
By the way the "add - update " work good but when i search the error appear
i am using the package ---->
https://filamentphp.com/plugins/filament-spatie-translatable
Filament
Spatie Translatable by Filament - Filament
Filament support for Spatie's Laravel Translatable package.
Solution:Jump to solution
The New Code
```
public function applySearchConstraintToQuery(Builder $query, string $column, string $search, string $whereClause, bool $isCaseInsensitivityForced = false): Builder
{...
15 Replies
What DB and version are you using?
Apache/2.4.56 (Win64) OpenSSL/1.1.1t PHP/8.2.4
Database client version: libmysql - mysqlnd 8.2.4
PHP extension: mysqli Documentation curl Documentation mbstring Documentation
PHP version: 8.2.4
That doesn't answer the question 😅
MySQL, MariaDB, Postgres, SQLite?
mysql
Which version?
8.2.4
Can you share the code for the column?
okay
->columns([
ImageColumn::make('image')
->label('image')
->size(40)
->disk('public')
->visibility('private'),
Tables\Columns\TextColumn::make('title')
->label('title')
->searchable(),
Tables\Columns\TextColumn::make('description')
->label('description')
->searchable(),
Tables\Columns\TextColumn::make('url')
->label('url')
->searchable(),
Tables\Columns\TextColumn::make('button_action')
->label('button_action')
->searchable(),
Tables\Columns\TextColumn::make('created_at')
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('updated_at')
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
])
Sounds like an issue with the package. Can you reproduce this in a fresh project and open an issue on GitHub?
okay
@Dennis Koch i have solved this Wow
i edited the function applySearchConstraintToQuery in the following path project name \vendor\filament\spatie-laravel-translatable-plugin\src\SpatieLaravelTranslatableContentDriver.php the old code was
Solution
The New Code
this new code support multiple languages English and Arabic
Please open a PR then. Thanks!
sorry I didn't get you
If you want this to be fixed in the core package you need to create a pull request : https://github.com/filamentphp/filament/pulls
I have created the pull request for this issue .