Download the PHP package thenextweb/passgenerator without Composer

On this page you can find all versions of the php package thenextweb/passgenerator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package passgenerator

Passgenerator

Passgenerator is a Laravel7+ package that allows you to easily create passes compatible with Apple Wallet (former Passbook).

👉 Table of Contents 👈

👮 Requirements

Only things needed are Laravel 7+ and to have the PHP Zip extension installed and enabled.

💾 Installation

The best and easiest way to install the package is using the Composer package manager. To do so, run this command in your project root:

Then, add the Thenextweb\PassGeneratorServiceProvider provider to the providers array in config/app.php:

That's it!

🍎 Apple docs

From now on, some stuff is much better explained on the Apple docs, so when in doubt just check (if you haven't done so) the following documents:

📝 Configuration

To start using the package some Apple files are needed, as well as some action in order to convert them to more friendly formats:

  1. Go to the Apple Developer page ➵ Identifiers ➵ Pass Type IDs.

  2. Next, you need to create a pass type ID. This is similar to the bundle ID for apps. It will uniquely identify a specific kind of pass. It should be of the form of a reverse-domain name style string (i.e., pass.com.example.appname).

  3. After creating the pass type ID, click on Edit and follow the instructions to create a new Certificate.

  4. Once the process is finished, the pass certificate can be downloaded. That's not it though, the certificate is downloaded as .cer file, which need to be converted to .p12 in order to work. If you are using a Mac you can import it into Keychain Access and export it from there. Make sure to remember the password you have given to the exported file since you'll have to use it later. You can also use other tools to convert the certificate but be sure it includes the private key on the exported PKCS12 file.

  5. If you have made iOS development, you probably have already the Apple Worldwide Developer Relations Intermediate Certificate in your Mac’s keychain. If not, it can be downloaded from the Apple Website (on .cer format). This one needs to be exported as .pem, you can also do so from Keychain Access (or whatever tool you use to manage certificates on your OS).

Once all this tedious process has been done, everything is almost ready to start using the package. The easiest now is to add to the following keys to your .env file:

In case there is a reason the config file must be modified (conflicting env keys, dynamic certificates required...), it can be published with the following command:

🚀 Usage

To create a pass for the first time, you have to first create the pass definition, either as a JSON file or as an array. It is really recommended to have already read the Apple docs as well as the PassKit Package Format Reference.

Now, a valid ticket is already in place. Apple recommends a MIME type to serve it to its devices so something like the following should do:

Later on, if your users need to download the pass again, you don't need to create it again (wasting all those CPU cycles on crypto stuff), you can just do something like:

It is also possible to retrieve the actual path to a pass on your filesystem. By default, Passgenerator will copy your default filesystem config (usually rooted on storage_path('app') but you can always do getPassFilePath($pass_identifier) and retrieve the real path (in case it exists).

Definitions

It is also possible to programatically create/modify a pass using the definitions objects. Eg.-


All versions of passgenerator with dependencies

PHP Build Version
Package Version
Requires ext-zip Version *
illuminate/support Version ^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/filesystem Version ^7.0|^8.0|^9.0|^10.0|^11.0
thecodingmachine/safe Version ^2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package thenextweb/passgenerator contains the following files

Loading the files please wait ....