uppercese category qoshildi
This commit is contained in:
@@ -61,4 +61,16 @@ class QrController extends Controller
|
||||
$qr = QrCode::format('png')->size(200)->generate($url);
|
||||
Storage::put($dir . '/qr.png', $qr);
|
||||
}
|
||||
|
||||
public function qrImage($type, $id)
|
||||
{
|
||||
$dbType = $type === 'auto' ? 'auto_' : 'estate_';
|
||||
$path = storage_path('app/public/attachments/' . $dbType . $id . '/qr.png');
|
||||
|
||||
if (!file_exists($path)) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
return response()->file($path);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user