Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Mobile Pass Laravel Package

spatie/laravel-mobile-pass

Laravel package to generate Apple Wallet mobile passes (boarding passes, tickets, coupons, cards) with support for pushing updates to issued passes so they stay current on users’ devices. In development—don’t use in production yet.

View on GitHub
Deep Wiki
Context7

title: Updating passes weight: 4

When your user downloads a pass and adds it to their Wallet, Apple will send a request to confirm that the pass has been registered.

The package will handle the incoming request, and store the registration in the mobile_pass_registrations table. This registration will be associated the MobilePass model that was used to generate the pass that was downloaded by the user.

Here's how you can update a saved pass.

use App\Models\MobilePass;
use Spatie\LaravelMobilePass\Models\FieldContent;

$mobilePass = $user->firstMobilePass();

$mobilePass
    ->builder()
    ->updateField('seat', fn (FieldContent $field) =>
        $field->setValue('13A')
    )
    ->save();

When a pass gets updated, the package will notify Apple that the pass has been updated.

Apple will then tell the device that a new version of the pass is available.

Then, the device requests the latest version of the pass from your server.

Here's how you can trigger a push notification for a change:

use App\Models\MobilePass;
use Spatie\LaravelMobilePass\Models\FieldContent;

$mobilePass = $user->firstMobilePass();

$mobilePass
    ->builder()
    ->updateField('seat', fn (FieldContent $field) =>
        $field
            ->setValue('13A')
            ->showMessageWhenChanged("Your seat was changed")
    )
    ->save();
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport