ralphjsmit
ralphjsmit
FFilament
Created by Jocke on 12/28/2023 in #❓┊help
Laravel Vapor gzip
Livewire injecting features comes after all the middleware because it listens to the RequestHandled event. If the response then already is gzipped or brotli'd, then it will not inject the assets and you get this empty page type of thing.
7 replies
FFilament
Created by Jocke on 12/28/2023 in #❓┊help
Laravel Vapor gzip
Ok, it was actually not too hard to figure out 😄
7 replies
FFilament
Created by Wiin on 4/8/2024 in #❓┊help
Problem with gzip middleware
I can confirm the posted solution works ^
5 replies
FFilament
Created by Jocke on 12/28/2023 in #❓┊help
Laravel Vapor gzip
Thank you so much for the solution, I also just needed this. Have you got any clue why this is the solution?
7 replies
FFilament
Created by Matthew on 11/5/2024 in #❓┊help
Filtering a Select Box
You would need to test if CreateAction::make() works, but otherwise a normal Action::make('create') with a form and action works fine for sure.
11 replies
FFilament
Created by Matthew on 11/5/2024 in #❓┊help
Filtering a Select Box
Yes, that does work! You can add eg a tableHeaderAction() with a modal form and then it should work.
11 replies
FFilament
Created by ericmp on 11/4/2024 in #❓┊help
Add maxlength to 255 chars on TextInput by default
What you likely need to do is to provide a closure to maxLength() and only in that closure call getInputMode(). You need to imagine that ::configureUsing() is called immediately when someone does TextInput::make(). So at that point, if you call getInputMode() then the code in the configureUsing does not yet know what other methods are chained after it, so hence it doesn't work (what you also said). The solution therefore would be to fetch the getInputMode() at run-time, when the getMaxLength() function is actually being called:
TextInput::configureUsing(function (TextInput $component): void {
$component->maxLength(function (TextInput $component) {
$inputMode = $component->getInputMode();

if ($inputMode !== 'numeric' && $inputMode !== 'decimal') {
return 255;
}

return null;
});
});
TextInput::configureUsing(function (TextInput $component): void {
$component->maxLength(function (TextInput $component) {
$inputMode = $component->getInputMode();

if ($inputMode !== 'numeric' && $inputMode !== 'decimal') {
return 255;
}

return null;
});
});
7 replies
FFilament
Created by Mansoor Khan on 5/7/2024 in #❓┊help
Open a Modal when field state changes
Awesome!
7 replies
FFilament
Created by Mansoor Khan on 5/7/2024 in #❓┊help
Open a Modal when field state changes
You can try something like $livewire->mountFormComponentAction() or sth
7 replies
FFilament
Created by Prosp30 on 3/19/2024 in #❓┊help
Download PDF using Spatie Laravel-PDF on table action
Makes sense, I generally have a /debug route in my applications that's only available locally (and on production perhaps for admins), that's helpful sometimes a well
23 replies
FFilament
Created by Prosp30 on 3/19/2024 in #❓┊help
Download PDF using Spatie Laravel-PDF on table action
No idea tbh, perhaps you can look on how this is achieved in a generic Livewire component
23 replies
FFilament
Created by Prosp30 on 3/19/2024 in #❓┊help
Download PDF using Spatie Laravel-PDF on table action
Thanks for this! The echo and base64 part were very helpful tips. For reference, I just implemented PDF download using Spatie/laravel-pdf from an action like this:
Tables\Actions\Action::make('download_order_invoice')
->icon('heroicon-o-arrow-down-tray')
->label('Download invoice')
->action(function (Order $order) {
$pdfBuilder = Pdf::view('pdfs.order-invoice', ['order' => $order])
->format(Format::A4)
->name("order-{$order->uuid}.pdf");

return response()->streamDownload(function () use ($pdfBuilder) {
echo base64_decode($pdfBuilder->download()->base64());
}, $pdfBuilder->downloadName);
}),
Tables\Actions\Action::make('download_order_invoice')
->icon('heroicon-o-arrow-down-tray')
->label('Download invoice')
->action(function (Order $order) {
$pdfBuilder = Pdf::view('pdfs.order-invoice', ['order' => $order])
->format(Format::A4)
->name("order-{$order->uuid}.pdf");

return response()->streamDownload(function () use ($pdfBuilder) {
echo base64_decode($pdfBuilder->download()->base64());
}, $pdfBuilder->downloadName);
}),
23 replies
FFilament
Created by Mansoor Khan on 3/13/2024 in #❓┊help
Upload image from URL
It's a caveat I didn't know, but I think it makes sense
42 replies
FFilament
Created by Mansoor Khan on 3/13/2024 in #❓┊help
Upload image from URL
Nice!
42 replies
FFilament
Created by Mansoor Khan on 3/13/2024 in #❓┊help
Upload image from URL
Or even just hardcode a URL from internet instead of an input
42 replies
FFilament
Created by Mansoor Khan on 3/13/2024 in #❓┊help
Upload image from URL
Yes, agree!
42 replies
FFilament
Created by Mansoor Khan on 3/13/2024 in #❓┊help
Upload image from URL
You could try creating a quick reproduction repository for Filament and submit a bug report
42 replies
FFilament
Created by Mansoor Khan on 3/13/2024 in #❓┊help
Upload image from URL
It seems like the process() function sets this to false, so I think that the issue is somewhere there
42 replies
FFilament
Created by Mansoor Khan on 3/13/2024 in #❓┊help
Upload image from URL
No description
42 replies
FFilament
Created by Mansoor Khan on 3/13/2024 in #❓┊help
Upload image from URL
No me neither, at least I think if the preview doesn't reset when changed using $set/->state(), it could even be considered a bug
42 replies