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: Storing mobile passes weight: 5

Typically, you don't need to store mobile passes as they will be generated on the fly when a user tries to download it.

However, if you want to store the pass for later use, you can do so by using the generate method on a MobilePass model.

use Spatie\LaravelMobilePass\Models\MobilePass;

$mobilePassContent = $mobilePass->generate();

file_put_contents('path/to/store/pass.pkpass', $mobilePassContent);

Generating a mobile pass without a model

If you don't want to create MobilePass model, you could also call generate on one of the mobile pass builders.

$mobilePassContent = AirlinePassBuilder::make()
    ->setOrganisationName('My organisation')
//  other calls
    ->generate();

file_put_contents('path/to/store/pass.pkpass', $mobilePassContent);

The code above will not create a MobilePass model. Be aware, that if you create a pass this way that users will not be notified when the pass is updated.

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