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: Using passes as mail attachments weight: 7

In your mail templates, you can attach passes to your emails. This is useful when you want to send a pass to a user after a purchase or when you want to send a pass to a user after they have signed up for a service.

To attach a pass to an email, you can simply return it in the attachments method of your Mailable class. Here's an example:

class OrderShipped extends Mailable
{
    public MobilePass $pass;

    public function __construct(MobilePass $pass)
    {
        $this->pass = $pass;
    }

    public function attachments()
    {
        return [
            $this->pass,
        ];
    }
}

By default, the pass will be attached as a pass.pkpass file. If you want to change the filename, you can do so specify the download name when creating the pass:

$mobilePass = AirlinePassBuilder::make()
    // this will result as the attachment name being set to 'boarding-pass-john-doe-to-london.pkpass'
    ->setDownloadName('boarding-pass-john-doe-to-london');
    ->setOrganisationName('My organisation')
    -> ... // other pass properties
    ->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