Xonardon
Xonardon
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
fill() not work
30 replies
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
Tell me why these properties are required, I still haven’t found where they are used, the breakpoint does not work. is there a built-in method for this? I would like to go deeper into understanding this
30 replies
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
how can I fix this?
30 replies
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
I want to improve the component and make it a fully customizable builder
30 replies
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
Forms\Components\Livewire::make(\App\Filament\Pages\QrCode::class)
30 replies
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
<x-filament::page>
<div class="flex items-stretch justify-center gap-4">
<div class="w-full lg:w-1/2">
{{ $this->form }}
</div>
<div class="w-full lg:w-1/2">
<x-filament::section>
<x-slot name="heading">
Preview
</x-slot>

<div id="qrcode" class="text-center flex justify-center items-center">
{!! \App\Filament\Pages\QrCode::maketheqr($this->form->getState()) !!}
</div>

<x-slot name="headerEnd">
<x-filament::button type="button" @click="download('{{ 'filename' }}')">
Download
</x-filament::button>
</x-slot>
</x-filament::section>
</div>
</div>
{{-- better to use @push...--}}
<<script defer src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js" integrity="sha512-CNgIRecGo7nphbeZ04Sc13ka07paqdeTu0WR1IM4kNcpmBAUSHSQX0FslNhTDadL4O5SAGapGt4FodqL8My0mA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script defer>
import domtoimage from 'dom-to-image';
import {saveAs} from 'file-saver';

window.download = function (domain) {
var node = document.querySelector('#qrcode svg');
domtoimage.toBlob(node)
.then(function (blob) {
window.saveAs(blob, domain + '.png');
})
.catch(function (error) {
console.error('oops, something went wrong!', error);
});
}
</script>
</x-filament::page>
<x-filament::page>
<div class="flex items-stretch justify-center gap-4">
<div class="w-full lg:w-1/2">
{{ $this->form }}
</div>
<div class="w-full lg:w-1/2">
<x-filament::section>
<x-slot name="heading">
Preview
</x-slot>

<div id="qrcode" class="text-center flex justify-center items-center">
{!! \App\Filament\Pages\QrCode::maketheqr($this->form->getState()) !!}
</div>

<x-slot name="headerEnd">
<x-filament::button type="button" @click="download('{{ 'filename' }}')">
Download
</x-filament::button>
</x-slot>
</x-filament::section>
</div>
</div>
{{-- better to use @push...--}}
<<script defer src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js" integrity="sha512-CNgIRecGo7nphbeZ04Sc13ka07paqdeTu0WR1IM4kNcpmBAUSHSQX0FslNhTDadL4O5SAGapGt4FodqL8My0mA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script defer>
import domtoimage from 'dom-to-image';
import {saveAs} from 'file-saver';

window.download = function (domain) {
var node = document.querySelector('#qrcode svg');
domtoimage.toBlob(node)
.then(function (blob) {
window.saveAs(blob, domain + '.png');
})
.catch(function (error) {
console.error('oops, something went wrong!', error);
});
}
</script>
</x-filament::page>
` help me make a working download button
30 replies
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
PHP 8.2.18 11.7.0 Filament\Forms\ComponentContainer::Filament\Forms\Concerns{closure}(): Argument #1 ($component) must be of type Filament\Forms\Components\Component, Illuminate\Support\HtmlString given
30 replies
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
no, what data should be here? LaraZeus\Qr\Facades\Qr::render(): Argument #1 ($data) must be of type ?string, array given, called in /home/roman/PhpstormProjects/historia-back/app/Filament/Resources/BoxResource.php on line 94
\LaraZeus\Qr\Facades\Qr::render(data: [
'url' => 'https://filamentphp.com/',
'size' => '300',
'margin' => '1',
'color' => 'rgb(0, 0, 0)',
'back_color' => 'rgb(252, 252, 252)',
'gradient_form' => 'rgb(69, 179, 157)',
'gradient_to' => 'rgb(241, 148, 138)',
'eye_color_inner' => 'rgb(241, 148, 138)',
'eye_color_outer' => 'rgb(69, 179, 157)',
'gradient_type' => 'vertical',
'style' => 'square',
'eye_style' => 'square',
])
\LaraZeus\Qr\Facades\Qr::render(data: [
'url' => 'https://filamentphp.com/',
'size' => '300',
'margin' => '1',
'color' => 'rgb(0, 0, 0)',
'back_color' => 'rgb(252, 252, 252)',
'gradient_form' => 'rgb(69, 179, 157)',
'gradient_to' => 'rgb(241, 148, 138)',
'eye_color_inner' => 'rgb(241, 148, 138)',
'eye_color_outer' => 'rgb(69, 179, 157)',
'gradient_type' => 'vertical',
'style' => 'square',
'eye_style' => 'square',
])
30 replies
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
No description
30 replies
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
No description
30 replies
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
30 replies
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
No description
30 replies
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
No description
30 replies
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
30 replies
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
https://web.archive.org/web/20240221193114/https://www.simplesoftware.io/#/docs/simple-qrcode their site is not working and I would like to have a reactive field with a link and download buttons png, svg
30 replies
FFilament
Created by Xonardon on 5/13/2024 in #❓┊help
QR in Form Section [CreateRecord, EditRecord]
30 replies