lxbln
lxbln
FFilament
Created by lxbln on 2/7/2024 in #❓┊help
Spatie Media Library: Attaching the same image to many posts
I am just starting with filament and I wanted to use Spatie Media Library. What I do not understand is if I can reuse an already uploaded file. Lets say I have a table with posts and each post has a preview-image. The upload field looks like this:
SpatieMediaLibraryFileUpload::make('Preview Image')
->collection('preview-images')
SpatieMediaLibraryFileUpload::make('Preview Image')
->collection('preview-images')
But what if many posts will have the same image ? Do I need to upload the same image for every post ? The upload field does not allow me to choose an existing one and attach it to my post. thanks
5 replies
FFilament
Created by lxbln on 11/14/2023 in #❓┊help
filter table by default (without the option to remove the filter)
The question is actually pretty simple. In my users table I have a column 'type'. Some users are of type 'admin'. In filament I want to manage only those users. Can I define a filter, that sets type='admin', which can also not be removed. Ideally the filter would not even be visible. Thanks.
4 replies