PHP code example of fadlee / filament-qrcode-field
1. Go to this page and download the library: Download fadlee/filament-qrcode-field library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
fadlee / filament-qrcode-field example snippets
use Fadlee\FilamentQrCodeField\Forms\Components\QrCodeInput;
public static function form(Form $form): Form
{
return $form
->schema([
QrCodeInput::make('qrcode')
->label('QR Code')
->placeholder('Click to scan QR code...'),
// ... other fields
]);
}
public static function form(Form $form): Form
{
return $form
->schema([
QrCodeInput::make('product_code')
->label('Product QR Code')
->placeholder('Scan product code...'),
QrCodeInput::make('location_code')
->label('Location QR Code')
->placeholder('Scan location code...'),
]);
}
use Filament\Actions\Action;
public static function getActions(): array
{
return [
Action::make('scanQR')
->form([
QrCodeInput::make('qrcode')
->label('Scan QR Code')
->
bash
php artisan filament:assets
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.