1. Go to this page and download the library: Download tsungsoft/qr-code-reader 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/ */
tsungsoft / qr-code-reader example snippets
use Illuminate\Http\Request;
use Laravel\Nova\Resource;
use Tsungsoft\QrCodeReader\QrCodeReader;
class ResourceName extends Resource {
//...
public function fields(Request $request)
{
return [
//...
QrCodeReader::make('Name', 'name_id') // Name -> label name, name_id -> save to column
->canInput() // the user able to input the code using keyboard, default false
->canSubmit() // on modal scan need to click submit to send the code to the input value, default false
->displayValue() // display value beside qr code on detail view, default false
->qrSizeIndex() // set qr size on index, default 30
->qrSizeDetail() // set qr size on detail, default 100
->qrSizeForm() // set qr size on form, default 50
->viewable() // set viewable if has belongto value, default true
->displayWidth('720px'), // set display width, default auto
//...
];
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.