© 2026 Hedgehog Software, LLC

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

Spatie media library in livewire component

Hello, everyone. I am using Spatie Media Library upload. I have this component
          SpatieMediaLibraryFileUpload::make('energy_invoice')
                        ->label(__('app.resources.work_points.energy_invoices'))
                        ->collection('energy_invoices')
                        ->maxSize(5000)
                        ->downloadable(),
          SpatieMediaLibraryFileUpload::make('energy_invoice')
                        ->label(__('app.resources.work_points.energy_invoices'))
                        ->collection('energy_invoices')
                        ->maxSize(5000)
                        ->downloadable(),

I have this in my model
 */
class CompanyConsumption extends Model implements HasMedia
{
    use HasCompany, HasFactory ,InteractsWithMedia;
 */
class CompanyConsumption extends Model implements HasMedia
{
    use HasCompany, HasFactory ,InteractsWithMedia;
and the form in livewire component has this model
            ])->model($this->companyConsumption);
            ])->model($this->companyConsumption);

With all of this it seems that the upload doesn't work. It doesn't do anything.
Can you assist me with this?
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

Spatie media library in RichEditor component
FilamentFFilament / ❓┊help
2y ago
Spatie Media Library plugin not working in livewire form component
FilamentFFilament / ❓┊help
3y ago
Spatie Media Library
FilamentFFilament / ❓┊help
10mo ago
Spatie Media Library
FilamentFFilament / ❓┊help
14mo ago