Project Description
I already have a Laravel-based tool that creates a PDF, stores it locally, and prints a unique QR code on the file. When that QR is scanned today, the user lands on a private confirmation page that I host, where the file can be downloaded once more.
What I need is a small but crucial change: the QR must now take the user straight to the official website’s confirmation page. The official site exposes an API endpoint that returns the exact confirmation URL I should display, so your code will call that API, obtain the link, and perform the redirect.
Once the user is on the official confirmation page, the visible “Download” button there must still serve the PDF that lives on my server, not any file the official site may hold. In other words, the UI and flow remain identical for the visitor, but behind the scenes the download points back to my storage bucket.
Key requirements
• Keep the current QR generation logic and encoding unchanged.
• Work entirely within PHP / Laravel.
• Use the official site’s API for the confirmation link.
• Ensure the download endpoint securely streams the correct PDF from my system.
- The development environment uses SQLite, so migrations, local testing, and any DB-related logic must be SQLite-compatible.
Deliverables
1. Updated Laravel controller/service handling the API call, redirect, and signed download URL.
2. Any route or middleware adjustments needed for security.
3. A short read-me showing where to drop the code and how to test by scanning a sample QR.
Acceptance criteria
– Scanning an old or newly generated QR shows the official confirmation page URL in the browser.
– Clicking “Download” on that page retrieves the PDF from my storage every time.
– No change in QR encoding or visual appearance.
The codebase is tidy and documented, so this is a focused task for someone comfortable with Laravel and simple API integrations.