© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
ghostrockz3d

Custom model for spatie media library upload and spatie settings

I want to upload a media (favicon) on laravel settings but it seems they don't work with each other so I thought I create another model called MediaSetting

this is the migration notice it's the same schema as spatie laravel settings
$table->string('group');
$table->string('name')->index();
$table->string('group');
$table->string('name')->index();


And here's my SeoSettings
class ManageSeo extends SettingsPage
{
    protected static string $settings = SeoSettings::class;
....
class ManageSeo extends SettingsPage
{
    protected static string $settings = SeoSettings::class;
....

and so on here's the important part
Forms\Components\SpatieMediaLibraryFileUpload::make('favicon')
                    ->collection('favicon')
                    ->model(MediaSetting::class)
Forms\Components\SpatieMediaLibraryFileUpload::make('favicon')
                    ->collection('favicon')
                    ->model(MediaSetting::class)

Isn't it possible to pass the model (MediaSetting) and it uses this one for file uploads ?

I would appreciate any help
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 custom properties
FilamentFFilament / ❓┊help
13mo ago
Spatie Media Library temporary upload location?
FilamentFFilament / ❓┊help
2y ago
Unique identifier for file upload (Spatie Media Library)? 🤷♂
FilamentFFilament / ❓┊help
2y ago