filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
19.28k stars 2.96k forks source link

Array to string conversion #7903

Closed oumaimaamkane closed 1 year ago

oumaimaamkane commented 1 year ago

Package

filament/filament

Package Version

v2.0

Laravel Version

v10.19

Livewire Version

No response

PHP Version

php 8.2

Problem description

I used Repeater field and save the data to the database as json , I did the cast of the column in array , but when I want to list the records it gives me 'Array to string conversion' , I don't know how to trait the data before listing protected $casts =[ 'product' => 'array' ]; image

Expected behavior

I expected to show the product as text in the list

Steps to reproduce

I don't know

Reproduction repository

https://github.com

Relevant log output

No response

github-actions[bot] commented 1 year ago

Hey @oumaimaamkane! We're sorry to hear that you've hit this issue. 💛

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public GitHub repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.

Also, it doesn't look like you've provided much information on how to replicate the issue. Please edit your original post with clear steps we need to take.

Z3d0X commented 1 year ago

Hi, GitHub issues is not the place to reach out for support, please use GitHub Discussions or Discord

jodinathan commented 1 year ago

this is also happening to me.
this page https://filamentphp.com/community/how-to-consume-an-external-api-with-filament-tables could surely add an example with a more complex json.