hitech95
hitech95
FFilament
Created by hitech95 on 9/20/2024 in #❓┊help
Download a generated file with Action button
The code is basically:
Action::make('download-draft')
->label('Download draft')
->action(function ($get) {
$mpdf = new \Mpdf\Mpdf();
// This uses the $get to generate a proper page
$mpdf->WriteHTML('Hello World');

// Sends output inline to browser
$mpdf->Output();

// I also tried with:
response()->streamDownload(fn() => $mpdf->Output($get('name').'.pdf', Destination::INLINE)

});
Action::make('download-draft')
->label('Download draft')
->action(function ($get) {
$mpdf = new \Mpdf\Mpdf();
// This uses the $get to generate a proper page
$mpdf->WriteHTML('Hello World');

// Sends output inline to browser
$mpdf->Output();

// I also tried with:
response()->streamDownload(fn() => $mpdf->Output($get('name').'.pdf', Destination::INLINE)

});
@Leandro Ferreira If necessary I can update my previous repo demo with such example.
11 replies
FFilament
Created by hitech95 on 9/20/2024 in #❓┊help
Download a generated file with Action button
Yes, it is a http response with proper headers set. As it is a preview/draft it is not stored on the storage. I can provide an example!
11 replies
FFilament
Created by hitech95 on 9/20/2024 in #❓┊help
Download a generated file with Action button
the pdf is not stored. i've tried with the livewire:
response()->streamDownload(fn() => mycalltoservice(), $get('name').'.pdf')
response()->streamDownload(fn() => mycalltoservice(), $get('name').'.pdf')
11 replies
FFilament
Created by hitech95 on 9/20/2024 in #❓┊help
Download a generated file with Action button
I'm taking the form data via $get and passing it to a service that generate a PDF
11 replies
FFilament
Created by hitech95 on 9/20/2024 in #❓┊help
Download a generated file with Action button
Its a stream tho. Its not a stored file
11 replies
FFilament
Created by hitech95 on 9/13/2024 in #❓┊help
Reload Page on table row action success
Any clue on what it could be? The only info i've found online is about wrong namespaces.
31 replies
FFilament
Created by hitech95 on 9/13/2024 in #❓┊help
Reload Page on table row action success
Yea the issue is when I click the button (Header Action), livewire throws that error. So I'm probably doing something wrong.
31 replies
FFilament
Created by hitech95 on 9/13/2024 in #❓┊help
Reload Page on table row action success
no at 100%, just asking as a header button should also reset the teams and update the tables.
31 replies
FFilament
Created by hitech95 on 9/13/2024 in #❓┊help
Reload Page on table row action success
thanks it worked but I've encountered another issue. When I create an header action in the TeamsGame Page I'm getting a "unable to find component error app filament.resources.game-resource.teams-game". Any hint on that?
31 replies
FFilament
Created by hitech95 on 9/13/2024 in #❓┊help
Reload Page on table row action success
ok but this event is broadcasted and for both tables are listening to the event right?
31 replies
FFilament
Created by hitech95 on 9/13/2024 in #❓┊help
Reload Page on table row action success
if you have any question please let me know 😄
31 replies
FFilament
Created by hitech95 on 9/13/2024 in #❓┊help
Reload Page on table row action success
the default route is /admin
31 replies
FFilament
Created by hitech95 on 9/13/2024 in #❓┊help
Reload Page on table row action success
the player should be assigned to one of the teams, use the swithc button to move to the other team
31 replies
FFilament
Created by hitech95 on 9/13/2024 in #❓┊help
Reload Page on table row action success
31 replies
FFilament
Created by hitech95 on 9/13/2024 in #❓┊help
Reload Page on table row action success
Wow it took a lot of time to strip out lot of proprietary stuff... I'm going to give you the repo in a few minutes. How to use: - create a filament user - go inside player (resource) and create a player for the user - go in game and create a game - go to the edit page and add a player from the list. - click the players actions in the header
31 replies
FFilament
Created by hitech95 on 9/13/2024 in #❓┊help
Reload Page on table row action success
Yes! And thanks for the time 😄 I've spent 10h on this trying on a solution. So having a proper input is awesome!
31 replies
FFilament
Created by hitech95 on 9/13/2024 in #❓┊help
Reload Page on table row action success
The dialog is not showing up, I get the darker color but no modal is visible. My bad I had a typo, it still only update the table I've clicked on and not the other one.
31 replies
FFilament
Created by hitech95 on 9/13/2024 in #❓┊help
Reload Page on table row action success
let me try that
31 replies
FFilament
Created by hitech95 on 9/13/2024 in #❓┊help
Reload Page on table row action success
Yes only that, and similar for the form
31 replies
FFilament
Created by hitech95 on 9/13/2024 in #❓┊help
Reload Page on table row action success
https://pastebin.com/21HMegVT I went with pastebin 😄 I've stripped all the fields that are not necessary as there were a lot. those tables are quite big.
31 replies