© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
5 replies
Davide Cariola

Table Filter for Repeater Json Column

Hi guys.

I am having problems with the data saved by a repeater.
As the documentation says, I created a json column for the repeater and casted it to array in the model. Now I'm trying to create a filter on that column, but the
where
where
and
whereJsonContains
whereJsonContains
Eloquent methods don't seem to work.
I've also tried with raw SQL but it doesn't find any record.

Here's the content of the column:
"[
  {
    \"visibility_type\":\"Section Home Page\",
    \"visibility_time\":27,
    \"visibility_price\":233.84
  },
  {
    \"visibility_type\":\"Newsletter\",
    \"visibility_time\":21,
    \"visibility_price\":200.3
   }
]"
"[
  {
    \"visibility_type\":\"Section Home Page\",
    \"visibility_time\":27,
    \"visibility_price\":233.84
  },
  {
    \"visibility_type\":\"Newsletter\",
    \"visibility_time\":21,
    \"visibility_price\":200.3
   }
]"


Am I doing something wrong? Thank you very much for your help and sorry for the stupid question.

In the images: my repeater code and the filter.
image.png
image.png
Solution
The error was caused by my test data: by using
json_encode
json_encode
in the factory code, together with casting, the json was saved with the
""
""
.

Maybe it can be useful in the future for someone with a problem similar to mine 🥲
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

Table Column for json value
FilamentFFilament / ❓┊help
3y ago
filter table column relation
FilamentFFilament / ❓┊help
3y ago
Table filter below column?
FilamentFFilament / ❓┊help
3y ago
Repeater on a simple json column
FilamentFFilament / ❓┊help
3y ago