solved issued for apache url path issue in production
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 27s
Laravel Pint / pint (pull_request) Successful in 2m17s
Laravel Larastan / larastan (pull_request) Failing after 3m11s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 27s
Laravel Pint / pint (pull_request) Successful in 2m17s
Laravel Larastan / larastan (pull_request) Failing after 3m11s
This commit is contained in:
@@ -20,11 +20,16 @@ class ProductionStickerReprintController extends Controller
|
|||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
public function downloadQrPdf($palletNo)
|
// public function downloadQrPdf($palletNo)
|
||||||
|
// {
|
||||||
|
public function downloadQrPdf(Request $request)
|
||||||
{
|
{
|
||||||
$palletNo = urldecode($palletNo);
|
// $palletNo = urldecode($palletNo);
|
||||||
|
$palletNo = urldecode($request->query('palletNo'));
|
||||||
|
|
||||||
$qrPayload = rtrim($palletNo, '|') . '|';
|
if (!$palletNo) {
|
||||||
|
abort(400, 'palletNo is required');
|
||||||
|
}
|
||||||
|
|
||||||
$parts = explode('|', $palletNo);
|
$parts = explode('|', $palletNo);
|
||||||
$itemCode = trim($parts[0]);
|
$itemCode = trim($parts[0]);
|
||||||
@@ -81,7 +86,7 @@ class ProductionStickerReprintController extends Controller
|
|||||||
// $palletNo = preg_replace('/\/.*/', '', $palletNo);
|
// $palletNo = preg_replace('/\/.*/', '', $palletNo);
|
||||||
|
|
||||||
// 5. Generate QR Code (base64)
|
// 5. Generate QR Code (base64)
|
||||||
$qrCode = new QrCode($qrPayload);
|
$qrCode = new QrCode($palletNo);
|
||||||
$output = new Output\Png();
|
$output = new Output\Png();
|
||||||
$qrBinary = $output->output($qrCode, 100); // 100 = size
|
$qrBinary = $output->output($qrCode, 100); // 100 = size
|
||||||
$qrBase64 = base64_encode($qrBinary);
|
$qrBase64 = base64_encode($qrBinary);
|
||||||
@@ -95,6 +100,8 @@ class ProductionStickerReprintController extends Controller
|
|||||||
'copies'=> $copies,
|
'copies'=> $copies,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -77,7 +77,9 @@ Route::get('/download-reprint-qr-pdf/{palletNo}', [PalletController::class, 'dow
|
|||||||
|
|
||||||
// Route::get('/download-reprint-process-pdf/{plant}/{item}/{process_order}/{coil_number}/{name}', [PalletController::class, 'downloadReprintProcess'])->name('download-reprint-process-pdf');
|
// Route::get('/download-reprint-process-pdf/{plant}/{item}/{process_order}/{coil_number}/{name}', [PalletController::class, 'downloadReprintProcess'])->name('download-reprint-process-pdf');
|
||||||
|
|
||||||
Route::get('/download-qr1-pdf/{palletNo}', [ProductionStickerReprintController::class, 'downloadQrPdf'])->where('palletNo', '.*')->name('download-qr1-pdf');
|
//Route::get('/download-qr1-pdf/{palletNo}', [ProductionStickerReprintController::class, 'downloadQrPdf'])->where('palletNo', '.*')->name('download-qr1-pdf');
|
||||||
|
Route::get('/download-qr1-pdf', [ProductionStickerReprintController::class, 'downloadQrPdf'])
|
||||||
|
->name('download-qr1-pdf');
|
||||||
|
|
||||||
// Production Dashboard Controller
|
// Production Dashboard Controller
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user