← All articles →

Building a QR SaaS in Laravel: what does it involve?

Want to build your own QR SaaS platform in Laravel? In this article I explain which components you need, which choices you have to make and where the pitfalls are.

Martin Knops · 17 Mar 2026

Laravel is the perfect framework for a QR SaaS platform. It's mature, well-documented and has a rich ecosystem of packages. But building a QR SaaS is more than creating a few routes and controllers.

In this article I walk through all the components you need for a production-ready QR SaaS platform.

1. The core: redirect engine

The redirect engine is the heart of the system. Every QR code points to a URL on your platform — for example qr.yourdomain.com/abc123. That URL needs to resolve to the final destination as quickly as possible.

In Laravel you create a dedicated controller for this:

class QrRedirectController extends Controller

{

public function resolve(string $code)

{

$tag = Cache::remember("tag:{$code}", 300, fn() =>

Tag::where('code', $code)->with('activeRedirect')->firstOrFail()

);

dispatch(new TrackScan($tag, request()))->afterResponse();

return redirect($tag->activeRedirect->url, 301);

}

}

Note the 301 redirect — this is important for the SEO of the destination page. And the cache prevents a database hit on every scan.

2. Multi-tenant architecture

A SaaS platform has multiple clients. Each client has their own tags, users and analytics. The simplest approach is a tenant_id column on all relevant tables.

In Laravel you use a global scope to filter automatically:

class TenantScope implements Scope

{

public function apply(Builder $builder, Model $model): void

{

$builder->where('tenant_id', auth()->user()->tenant_id);

}

}

Add this scope to your models and you never have to filter manually again.

3. QR code generation

For QR code generation you use a package like simplesoftwareio/simple-qrcode or endroid/qr-code. The QR code always points to your redirect endpoint — not to the final destination.

$qr = QrCode::format('png')

->size(300)

->generate("https://qr.yourdomain.com/{$tag->code}");

Store the generated QR code in storage so you don't have to regenerate it on every request.

4. Analytics

Analytics is where you make the difference compared to simple redirect services. You want to track at minimum:

- Scans per tag per day

- Unique scans vs total scans

- Device breakdown (mobile / desktop)

- Geographic distribution

- Peak hours

Use Laravel's queue system to process scan data asynchronously. This way you don't slow down the redirect.

For the frontend of the analytics dashboard, a combination of Filament widgets and a charting library like Chart.js or ApexCharts is ideal.

5. Admin dashboard

Filament is the best choice for the admin dashboard of a Laravel SaaS. It offers:

- CRUD interfaces for tags, campaigns and users

- Resources with full search, filter and sort options

- Widgets for analytics overviews

- Role-based access control via Filament Shield

6. Subscription and billing

For a real SaaS you need subscription management. Laravel Cashier integrates seamlessly with Stripe and offers:

- Monthly and annual subscriptions

- Usage-based billing (per scan or per tag)

- Automatic invoices

- Webhook handling for payment events

7. API

A REST API makes your platform integrable with external systems. In Laravel you use Laravel Sanctum for API authentication and Laravel API Resources for consistent response formatting.

Minimum API endpoints:

- GET /api/tags — list of tags

- POST /api/tags — create new tag

- PATCH /api/tags/{id} — change redirect URL

- GET /api/tags/{id}/scans — scan statistics

8. Infrastructure

A QR SaaS platform has specific infrastructure requirements:

- Queue worker: for asynchronous scan processing

- Redis: for caching and queue management

- Storage: for QR code images

- SSL: mandatory, because QR codes are scanned on mobile devices

On a VPS with DirectAdmin and AlmaLinux this runs fine. Make sure you have a dedicated subdomain for the redirect engine — qr.yourdomain.com — so you don't burden the main domain.

Conclusion

Building a QR SaaS platform in Laravel is a serious project. You need a well-thought-out architecture, knowledge of queues and caching, a solid multi-tenant structure and a good admin dashboard.

The good news: I've already done this. If you want to build your own QR SaaS, or if you want an existing idea worked out, get in touch. I'll help you from concept to production.

Tell me about your dynamic QR project. I'll give you honest advice within 24 hours — whether custom development is justified or not.

Send a message