Kiran Timsina
Kiran Timsina
FFilament
Created by Sam Pizzo on 10/14/2024 in #❓┊help
hours input
@Sam Pizzo , we're using Filament's inbuilt TimePicker.
11 replies
FFilament
Created by Kiran Timsina on 9/16/2024 in #❓┊help
Move Header Actions to Footer
There’s footer actions ? @toeknee
8 replies
FFilament
Created by Kiran Timsina on 9/16/2024 in #❓┊help
Move Header Actions to Footer
Tried this. I could move the save/cancel to top but couldn’t find header actions there
8 replies
FFilament
Created by namrata on 8/30/2024 in #❓┊help
Filters in page to change the widgets
I have been trying to do this in my ListResource page, but nothing seems to work no matter what I try from the documentation: https://filamentphp.com/docs/3.x/panels/dashboard#filtering-widget-data This simply does not work in ListResource .
3 replies
FFilament
Created by namrata on 8/11/2024 in #❓┊help
Default value in Select input
I tried your code. Strange. There's not default set. It's "Select an option" in my.
23 replies
FFilament
Created by Kiran Timsina on 8/16/2023 in #❓┊help
A way to make lazy search ?
Never mind, making it reactive() and lazy() worked for me. Though ideally i would like to implement reactiveOnReturn() or something like this. I don't have so much idea on how to do it, but seems like it could be good.
4 replies
FFilament
Created by namrata on 8/16/2023 in #❓┊help
Searchable not working in column
I am also stuck with the same problem.
6 replies
FFilament
Created by jay02k on 7/30/2023 in #❓┊help
relationship
TextColumn::make('user.name') assuming that you have a relation user() on Order model.
27 replies
FFilament
Created by Kiran Timsina on 7/29/2023 in #❓┊help
Unable to fetch value of filter on table and update widget
Thank you! Got it to work. Cheers. And thanks for the blog too! You're awesome!
9 replies
FFilament
Created by Kiran Timsina on 7/29/2023 in #❓┊help
Unable to fetch value of filter on table and update widget
Anyone?
9 replies
FFilament
Created by Carlo on 7/29/2023 in #❓┊help
Adding widget in a page resource
You're welcome.
6 replies
FFilament
Created by Carlo on 7/29/2023 in #❓┊help
Adding widget in a page resource
6 replies
FFilament
Created by Kiran Timsina on 7/27/2023 in #❓┊help
Resize Images after Upload
Done! I won't have to use spatie's package now. This is much faster (since image is loaded along with the model = much faster query for ecommerce application like mine) and offer more customization than it. Thanks a tons everyone!
27 replies
FFilament
Created by Kiran Timsina on 7/27/2023 in #❓┊help
Resize Images after Upload
thought about this too. But then again there is no consistency with the field names across the models. There are about 200 models and about 50 of them have images field. I am thinking about defining what fields are images in each model so the observer can watch for changes in those fields only.
27 replies
FFilament
Created by Kiran Timsina on 7/27/2023 in #❓┊help
Resize Images after Upload
that's not feasible as I will have to check for changes in several dozen models. I will explore more on if I can queue a job after file is uploaded.
27 replies
FFilament
Created by Kiran Timsina on 7/27/2023 in #❓┊help
Resize Images after Upload
just checked it, it's totally overkill. All i need to do is figure out how dispatchEvent() works with filament fields. ImageUpload::make('image')->dispatchEvent() I see there's such option. have you used it?
27 replies
FFilament
Created by Kiran Timsina on 7/27/2023 in #❓┊help
Resize Images after Upload
trait ImageUpload
{
public static function make($field, $label = null): FileUpload
{
Image::configure(['driver' => 'imagick']);
return FileUpload::make($field)
->image()
->imagePreviewHeight(200)
->imageResizeTargetHeight(FileService::ORIGINAL_SIZE)
->imageResizeMode('contain')
->imageResizeUpscale(false)
->enableOpen()
->maxSize(FileService::MAX_UPLOAD_SIZE)
->directory(fn ($livewire) => FileService::getUploadDirectory(class_basename($livewire->record)))
->label($label ?? null)
->getUploadedFileNameForStorageUsing(function (TemporaryUploadedFile $file, $get): string {
return (string) FileService::filename($file, $get('slug') ?: $get('name'));
});
}
}
trait ImageUpload
{
public static function make($field, $label = null): FileUpload
{
Image::configure(['driver' => 'imagick']);
return FileUpload::make($field)
->image()
->imagePreviewHeight(200)
->imageResizeTargetHeight(FileService::ORIGINAL_SIZE)
->imageResizeMode('contain')
->imageResizeUpscale(false)
->enableOpen()
->maxSize(FileService::MAX_UPLOAD_SIZE)
->directory(fn ($livewire) => FileService::getUploadDirectory(class_basename($livewire->record)))
->label($label ?? null)
->getUploadedFileNameForStorageUsing(function (TemporaryUploadedFile $file, $get): string {
return (string) FileService::filename($file, $get('slug') ?: $get('name'));
});
}
}
This is my trait to upload image. It works like I expect it to. I need to figure out a way to trigger an event when upload is successfull so that i can call the ResizeImage Job that I've made to resize the images passed to it.
27 replies
FFilament
Created by Kiran Timsina on 7/27/2023 in #❓┊help
Resize Images after Upload
I'll see what I can do, and share if I am able to find a solution.
27 replies
FFilament
Created by Kiran Timsina on 7/27/2023 in #❓┊help
Resize Images after Upload
It's in production. a few gigabyes of db. Migrating will be a big pain.
27 replies
FFilament
Created by Kiran Timsina on 7/27/2023 in #❓┊help
Resize Images after Upload
I started with this but the problem I faced is in the OP. I need to restructure the whole db and do a lot of refactoring for spatie to work.
27 replies