CappaS
Datetimepicker am/pm feature
I'm trying to develop my page with a DateTimePicker able to switch between AM/PM hours, a 12hr format.
I verified that in a previous PR, this feature was developed and merged but it's not working (https://github.com/filamentphp/filament/pull/6441).
It's a really useful feature.
How can the filament contributors develop it?
10 replies
Indian alphabet error
A user of mine tried to create a User and he inputted this JSON...
{
"email": "[email protected]",
"first_name": "נחמן ",
"last_name": "גולדווסר",
"mobile_phone": "(099)-999-9999",
"date_of_birth": "2000-06-24",
"gender": "Male"
}
It pass throught the required rule but in the controller the first_name and last_name were transformed to NULL, throwing an error in my database because first_name is NOT NULL
How can I interpret the indian alphabet??
2 replies
DateTimePicker not working hourFormat property
I'm trying to develop my page with a DateTimePicker able to switch between AM/PM hours, a 12hr format.
I verified that in a previous PR, this feature was developed and merged but it's not working (https://github.com/filamentphp/filament/pull/6441).
It's a really useful feature.
3 replies
DateTimePicker not working hourFormat property
I'm trying to develop my page with a DateTimePicker able to switch between AM/PM hours, a 12hr format.
I verified that in a previous PR, this feature was developed and merged but it's not working (https://github.com/filamentphp/filament/pull/6441).
It's a really useful feature.
1 replies
Download in PDF my filament page (with all css and features) (ctr+P is not working well)
I'm trying to download my view in a PDF file but it doesn't work.
I'm inside the Model file, Proposal Model.
1- I tried like this and works 100% well:
return Action::make('downloadPdf')->action(function () {
return response()->streamDownload(function () {
$pdf = App::make('dompdf.wrapper');
$pdf->loadHTML('<h1>Hello</h1>');
echo $pdf->stream();
}, 'proposal.pdf');
});
2- So I tried using my filament view and didn't work:
return Action::make('downloadPdf')->action(function () {
return response()->streamDownload(function () {
$html = view('filament.user.resources.proposals.preview', ['record' => $this])->render();
$pdf = App::make('dompdf.wrapper');
$pdf->loadHTML($html);
echo $pdf->stream();
}, 'proposal-'.$this->id.'.pdf');
});
The error is: Using $this when not in object context
3- Then, I tried only a Livewire file, and it worked, but without any filament feature (like buttons) and no css at all:
return Action::make('downloadPdf')->action(function () {
return response()->streamDownload(function () {
$html = view('livewire.pages.user.proposal.preview', ['record' => $this])->render();
$pdf = App::make('dompdf.wrapper');
$pdf->loadHTML($html);
echo $pdf->stream();
}, 'proposal-'.$this->id.'.pdf');
});
How can I do it?
I just need to print the view that I'm seeing on my screen.
6 replies