Add config to specify which cawangan are enabled to use MyKad reader
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
$default_port = '8085';
|
||||
$getScannerEndpoint = fn($x) => 'http://localhost:' . $x . '/?MYKADJSON';
|
||||
$getReaderEndpoint = fn($x) => 'http://localhost:' . $x . '/?MYKADJSON';
|
||||
|
||||
return[
|
||||
'endpoint' => env('MYKAD_SCANNER_endpoint', $getScannerEndpoint(env('MYKAD_SCANNER_PORT', $default_port))),
|
||||
];
|
||||
'endpoint' => env('MYKAD_READER_ENDPOINT', $getReaderEndpoint(env('MYKAD_READER_PORT', $default_port))),
|
||||
'enabled_cawangan' => array_map(fn ($cawangan) => trim($cawangan), explode(',', env('MYKAD_READER_ENABLED_CAWANGAN'))) ?? [],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user