Event ticket | laravel-mobile-pass | Spatie       

 SPATIE  

  Laravel Mobile Pass 
======================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-mobile-pass](https://spatie.be/docs/laravel-mobile-pass/v1)  Available-pass-types  Event ticket

 Version   v1      

 Other versions for crawler [v1](https://spatie.be/docs/laravel-mobile-pass/v1) 

  Event ticket    
- [ Introduction ](https://spatie.be/docs/laravel-mobile-pass/v1/introduction)
- [ Support us ](https://spatie.be/docs/laravel-mobile-pass/v1/support-us)
- [ Requirements ](https://spatie.be/docs/laravel-mobile-pass/v1/requirements)
- [ Installation &amp; setup ](https://spatie.be/docs/laravel-mobile-pass/v1/installation-setup)
- [ Getting credentials from Apple ](https://spatie.be/docs/laravel-mobile-pass/v1/getting-credentials-from-apple)
- [ Getting credentials from Google ](https://spatie.be/docs/laravel-mobile-pass/v1/getting-credentials-from-google)
- [ Questions and issues ](https://spatie.be/docs/laravel-mobile-pass/v1/questions-issues)
- [ Changelog ](https://spatie.be/docs/laravel-mobile-pass/v1/changelog)
- [ About us ](https://spatie.be/docs/laravel-mobile-pass/v1/about-us)

Basic usage
-----------

- [ Generating your first pass ](https://spatie.be/docs/laravel-mobile-pass/v1/basic-usage/generating-your-first-pass)
- [ Delivering passes to users ](https://spatie.be/docs/laravel-mobile-pass/v1/basic-usage/handing-out-passes)
- [ Adding images ](https://spatie.be/docs/laravel-mobile-pass/v1/basic-usage/adding-images)
- [ Adding barcodes ](https://spatie.be/docs/laravel-mobile-pass/v1/basic-usage/adding-barcodes)
- [ Updating a pass ](https://spatie.be/docs/laravel-mobile-pass/v1/basic-usage/updating-a-pass)
- [ Retrieving mobile passes ](https://spatie.be/docs/laravel-mobile-pass/v1/basic-usage/retrieving-mobile-passes)
- [ Expiring passes ](https://spatie.be/docs/laravel-mobile-pass/v1/basic-usage/expiring-passes)

Available pass types
--------------------

- [ Introduction ](https://spatie.be/docs/laravel-mobile-pass/v1/available-pass-types/introduction)
- [ Boarding pass ](https://spatie.be/docs/laravel-mobile-pass/v1/available-pass-types/boarding-pass)
- [ Event ticket ](https://spatie.be/docs/laravel-mobile-pass/v1/available-pass-types/event-ticket)
- [ Coupon ](https://spatie.be/docs/laravel-mobile-pass/v1/available-pass-types/coupon)
- [ Loyalty card ](https://spatie.be/docs/laravel-mobile-pass/v1/available-pass-types/loyalty)
- [ Generic ](https://spatie.be/docs/laravel-mobile-pass/v1/available-pass-types/generic)

Apple Wallet
------------

- [ Field zones ](https://spatie.be/docs/laravel-mobile-pass/v1/apple-wallet/field-zones)
- [ Apple-specific methods ](https://spatie.be/docs/laravel-mobile-pass/v1/apple-wallet/apple-specific-methods)
- [ Pass relevance ](https://spatie.be/docs/laravel-mobile-pass/v1/apple-wallet/pass-relevance)
- [ NFC passes ](https://spatie.be/docs/laravel-mobile-pass/v1/apple-wallet/nfc)
- [ Attaching Wi-Fi credentials ](https://spatie.be/docs/laravel-mobile-pass/v1/apple-wallet/attaching-wifi-credentials)
- [ Storing mobile passes ](https://spatie.be/docs/laravel-mobile-pass/v1/apple-wallet/storing-mobile-passes)
- [ Pass personalization ](https://spatie.be/docs/laravel-mobile-pass/v1/apple-wallet/pass-personalization)

Google Wallet
-------------

- [ Pass classes ](https://spatie.be/docs/laravel-mobile-pass/v1/google-wallet/pass-classes)
- [ Object methods ](https://spatie.be/docs/laravel-mobile-pass/v1/google-wallet/object-methods)
- [ Hosting pass images ](https://spatie.be/docs/laravel-mobile-pass/v1/google-wallet/hosting-images)

Advanced usage
--------------

- [ Handling errors ](https://spatie.be/docs/laravel-mobile-pass/v1/advanced-usage/handling-errors)
- [ Customizing actions ](https://spatie.be/docs/laravel-mobile-pass/v1/advanced-usage/customizing-actions)
- [ Customizing models ](https://spatie.be/docs/laravel-mobile-pass/v1/advanced-usage/customizing-models)
- [ Reading stored passes ](https://spatie.be/docs/laravel-mobile-pass/v1/advanced-usage/reading-stored-passes)
- [ Events ](https://spatie.be/docs/laravel-mobile-pass/v1/advanced-usage/events)
- [ Testing your passes ](https://spatie.be/docs/laravel-mobile-pass/v1/advanced-usage/testing-your-passes)

 Event ticket
============

###  On this page 

1. [ Apple ](#content-apple)
2. [ Google ](#content-google)

Event tickets cover concerts, festivals, sports events, conferences, and anything else where someone shows up at a specific time and place. Both platforms have a dedicated `EventTicketPassBuilder`.

Apple
-----------------------------------------------------------------------

```
use Spatie\LaravelMobilePass\Builders\Apple\EventTicketPassBuilder;

EventTicketPassBuilder::make()
    ->setOrganizationName('Fab Four Promotions')
    ->setSerialNumber('BTL-SHEA-0042')
    ->setDescription('The Beatles at Shea Stadium')
    ->addField('event', 'Beatles Live at Shea')
    ->addSecondaryField('section', 'B12')
    ->addSecondaryField('seat', 'Row 8, Seat 22')
    ->save();
```

Call `usePosterLayout()` to opt into Apple's poster-style layout, which renders the `artwork` image (see [Adding images](../basic-usage/adding-images)) as a full-bleed background. Devices that don't support it fall back to the classic layout automatically:

```
EventTicketPassBuilder::make()
    // ...
    ->setArtworkImage(public_path('images/artwork.png'))
    ->usePosterLayout()
    ->save();
```

Apple gates this layout behind an entitlement: your pass needs to be NFC-enabled, and the layout has to be enabled for your team. Until Apple has approved you, `usePosterLayout()` has no visible effect and Wallet keeps showing the classic layout. Check [Apple's Wallet documentation](https://developer.apple.com/documentation/walletpasses) for the current requirements.

The poster layout has a few visual appearance options of its own:

```
EventTicketPassBuilder::make()
    // ...
    ->usePosterLayout()
    ->setFooterBackgroundColor('#642c00')
    ->setSuppressHeaderDarkening(true)
    ->setUseAutomaticColors(true)
    ->save();
```

The `setFooterBackgroundColor()` method colors the footer area behind the barcode. The `setSuppressHeaderDarkening()` method turns off the darkening gradient Wallet normally overlays on the header. The `setUseAutomaticColors()` method lets Wallet compute the foreground and label colors from the background image itself, ignoring anything you set via `setForegroundColor()` and `setLabelColor()`.

All three only apply to the poster layout. They have no effect on the classic layout.

Event tickets can also carry venue details, which Wallet shows in the pass's event guide panel. Where the venue is:

- `setVenueName()`, `setVenueRegionName()`, `setVenueRoom()`
- `setVenueLocation()`, `setVenuePhoneNumber()`
- `setVenueEntrance()`, `setVenueEntranceDoor()`, `setVenueEntranceGate()`, `setVenueEntrancePortal()`

And when things happen there:

- `setVenueOpenDate()` and `setVenueCloseDate()`
- `setVenueDoorsOpenDate()`, `setVenueGatesOpenDate()`
- `setVenueFanZoneOpenDate()`, `setVenueBoxOfficeOpenDate()`, `setVenueParkingLotsOpenDate()`

There's also a `venueMap` image via `setVenueMapImage()`:

```
use Spatie\LaravelMobilePass\Builders\Apple\Entities\Location;

EventTicketPassBuilder::make()
    // ...
    ->setVenueName('Amsterdam ArenA')
    ->setVenueLocation(Location::make(52.3143, 4.9416))
    ->setVenueMapImage(public_path('images/venue-map.png'))
    ->save();
```

The event guide only shows up when the pass is relevant for a date, so call `setRelevantDate()` as well (see [Pass relevance](../apple-wallet/pass-relevance)). Note that `setVenueLocation()` only carries the coordinates: the altitude and relevant text a `Location` can hold are used by `addLocation()`, not by this semantic tag.

Event tickets can also carry event details Wallet shows alongside the venue guide. Tags valid for any event:

- `setEventName()`, `setEventType()`, `setEventStartDate()`, `setEventStartDateInfo()`, `setEventEndDate()`
- `setAdmissionLevel()`, `setAdmissionLevelAbbreviation()`, `setAttendeeName()`
- `setAdditionalTicketAttributes()`, `setEntranceDescription()`, `setGenre()`
- `setTailgatingAllowed()`, `setDuration()`, `setSilenceRequested()`
- `setSeats()`

For live performances:

- `setPerformerNames()`, `setArtistIds()`, `setAlbumIds()`, `setPlaylistIds()`

For sports events:

- `setAwayTeamAbbreviation()`, `setAwayTeamName()`, `setAwayTeamLocation()`
- `setHomeTeamAbbreviation()`, `setHomeTeamName()`, `setHomeTeamLocation()`
- `setLeagueAbbreviation()`, `setLeagueName()`, `setSportName()`

```
use Spatie\LaravelMobilePass\Builders\Apple\Entities\EventDateInfo;
use Spatie\LaravelMobilePass\Builders\Apple\Entities\Seat;
use Spatie\LaravelMobilePass\Enums\EventType;

EventTicketPassBuilder::make()
    // ...
    ->setEventType(EventType::LivePerformance)
    ->setEventStartDateInfo(EventDateInfo::make(
        date: Carbon::parse('2026-08-19 18:00'),
        timeZone: 'America/New_York',
    ))
    ->setSeats(Seat::make(number: '22', row: '8', section: 'B12'))
    ->save();
```

A `Seat` carries the nine properties Apple defines: `description`, `identifier`, `number`, `row`, `section`, `type`, `aisle`, `level` and `sectionColor`. All of them are optional, so pass only the ones you have. The `sectionColor` is a CSS-style RGB triple.

```
Seat::make(
    number: '22',
    row: '8',
    section: 'B12',
    aisle: 'A',
    level: 'Lower Bowl',
    sectionColor: 'rgb(23,187,82)',
)
```

Pass several seats at once by giving `setSeats()` more than one `Seat`.

Google
--------------------------------------------------------------------------

Declare the Class once per event (the venue, the show, the shared visuals), then create an Object per ticket.

```
use Spatie\LaravelMobilePass\Builders\Google\EventTicketPassBuilder;
use Spatie\LaravelMobilePass\Builders\Google\EventTicketPassClass;
use Spatie\LaravelMobilePass\Enums\BarcodeType;

// Once, per event
EventTicketPassClass::make('beatles-shea-1965')
    ->setIssuerName('Fab Four Promotions')
    ->setEventName('Beatles Live at Shea')
    ->setVenueName('Shea Stadium')
    ->setVenueAddress('126th Street & Roosevelt Avenue, Flushing, NY')
    ->setStartDate(Carbon::parse('1965-08-15 20:00'))
    ->setLogoUrl('https://cdn.example.com/beatles-logo.png')
    ->save();

// Per ticket
EventTicketPassBuilder::make()
    ->setClass('beatles-shea-1965')
    ->setAttendeeName('John Lennon')
    ->setSection('B12')
    ->setRow('8')
    ->setSeat('22')
    ->setBarcode(BarcodeType::Qr, 'BTL-SHEA-0042')
    ->save();
```

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
