F
Filament16mo ago
ghc

Create new Announce Exception

I am getting an error when trying to add an Announce. The error is "Array to string conversion". This error does not occur when I edit an existing Announce. I have attached a file with more information. If you need any further information, please let me know.
11 Replies
ghc
ghcOP16mo ago
Resource
ghc
ghcOP16mo ago
moudel
ghc
ghcOP16mo ago
migrations
ghc
ghcOP16mo ago
error
awcodes
awcodes16mo ago
Cast banner to an array.
ghc
ghcOP16mo ago
Can you show me an example? I don't quite understand.
LeandroFerreira
LeandroFerreira16mo ago
https://filamentphp.com/docs/3.x/forms/fields/file-upload#uploading-multiple-files
protected $casts = [
'banner' => 'array',
];
protected $casts = [
'banner' => 'array',
];
ghc
ghcOP16mo ago
What should I do with my draft (is Boolean)? Should I add it to fillable?
LeandroFerreira
LeandroFerreira16mo ago
protected $casts = [
'draft' => 'boolean',
'banner' => 'array',
];
protected $casts = [
'draft' => 'boolean',
'banner' => 'array',
];
ghc
ghcOP16mo ago
How do I understand $casts? Is it a forced data type conversion?
LeandroFerreira
LeandroFerreira16mo ago
check the laravel docs please
Want results from more Discord servers?
Add your server