© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
riz

Can't use FileUpload with multiple

I have a resource form with FileUpload. FileUpload works fine
with out using the "multiple". But when using multiple

I get this error:

Illuminate\Database\Grammar::parameterize(): Argument #1 ($values) must be of type array, int given,

EMPLOYEE Model
  protected $casts = [
        'attachment_path' => 'array',       
    ];

public function attachment() : HasOne
{
    return $this->hasOne(Attachment::class, 'group_id');
}
  protected $casts = [
        'attachment_path' => 'array',       
    ];

public function attachment() : HasOne
{
    return $this->hasOne(Attachment::class, 'group_id');
}


Employee Resource

Forms\Components\Section::make()
    ->relationship(
             'attachment',
              condition: fn (?array $state): bool => filled($state['attachment_path']),
             )
    ->schema([
           Forms\Components\FileUpload::make('attachment_path')
             ->multiple()
             ->openable(),
       ])
Forms\Components\Section::make()
    ->relationship(
             'attachment',
              condition: fn (?array $state): bool => filled($state['attachment_path']),
             )
    ->schema([
           Forms\Components\FileUpload::make('attachment_path')
             ->multiple()
             ->openable(),
       ])
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How can use webcam with FileUpload?
FilamentFFilament / ❓┊help
3y ago
Multiple FileUpload
FilamentFFilament / ❓┊help
16mo ago
FileUpload issue with multiple machines
FilamentFFilament / ❓┊help
2y ago
Multiple FIleUpload Reorderable
FilamentFFilament / ❓┊help
2y ago