Download the PHP package iupemai92/laravel-google-cloud-print without Composer

On this page you can find all versions of the php package iupemai92/laravel-google-cloud-print. 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 laravel-google-cloud-print

Google Cloud Print service for Laravel 5

Install

Via composer :

composer require bnbwebexpertise/laravel-google-cloud-print

Then add the service provider class to your Laravel config/app.php :

'providers' => [
    // ...
    Bnb\GoogleCloudPrint\LaravelServiceProvider::class,
    // ...
],

Also add the Facade alias if you intend to use it :

'aliases' => [
    // ...
    'GoogleCloudPrint' => Bnb\GoogleCloudPrint\Facades\GoogleCloudPrint::class,
    // ...
],

Configuration

Set the env parameter GCP_CREDENTIALS_PATH to the absolute path (or relative to the laravel application root) of the servie account JSON file downloaded from Google Console.

Google service setup

Create a service account key (IAM) with a ***@re-speedy-diagnostic.iam.gserviceaccount.com and download the JSON key file at https://console.developers.google.com/apis/credentials. Copy the file into the project at the configured env path.

You also need to allow print access to the generated email address on all the desired printers via the Google Cloud Print console at https://www.google.com/cloudprint/#printers.

This library will attempt to accept the invite if the Google API rejects the credentials. Indeed Google service accounts do not get the invitation email with the accept link and therefore need to use the API to complete the process.

Usage

Create a print task

Either use the Facade or the shortcut with one of the three provided content type to get a print task object :

Configure and send the print task

Calling ->printer($printerId) is required. The $printerId is the printer's UUID you get on the printer details page at Google Cloud Print console (or in the printer URL).

The content can be provided in three way :

You can set any other Cloud Job Ticket option via the ->ticket($key, $value) method. Some helpers are provided :

If the job is rejected an exception is thrown.

Examples


All versions of laravel-google-cloud-print with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
illuminate/config Version 6.x
illuminate/session Version 6.x
illuminate/support Version 6.x
google/apiclient 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 iupemai92/laravel-google-cloud-print contains the following files

Loading the files please wait ....