Download the PHP package sushidev/fairu-sdk without Composer

On this page you can find all versions of the php package sushidev/fairu-sdk. 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 fairu-sdk

Fairu SDK for Laravel

A comprehensive Laravel SDK for the Fairu GraphQL API with dynamic fragments, caching, and full type support.

Requirements

Installation

The package will auto-register its service provider and facade.

Publish Configuration

Configuration

Add the following to your .env file:

Full Configuration Options

Important: UUIDs

All IDs in the Fairu API are UUIDs (Universally Unique Identifiers). This applies to all resources:

Example:

Basic Usage

Queries

Mutations

Fragments

Fragments allow you to customize which fields are returned from the API.

Predefined Fragments

Each resource type has three predefined variants: minimal, default, and full.

Custom Fragments with FragmentBuilder

Register Custom Fragments

Caching

The SDK supports Laravel's cache system for API responses.

DTOs (Data Transfer Objects)

All input types have fluent DTOs for type-safe data handling.

Response Objects

All API responses are wrapped in typed response objects.

Paginated Lists

Enums

All GraphQL enums are available as PHP 8.1 backed enums.

Error Handling

Events

The SDK dispatches events for debugging and logging.

Multipart Uploads

For large files, use multipart uploads.

File Proxy

The File Proxy provides image transformation and optimized file delivery.

Configuration

Basic Usage

Image Transformations

Video Features

Other Options

Skipping the visible watermark

If the tenant uses the visible watermark (logo overlay), server-rendered URLs can skip it with withoutWatermark(). Pass the tenant's watermark key (fwm_..., shown in the Fairu tenant settings). The SDK appends wm=0 and a signature (wms) over the final query when the URL is built, so call order does not matter. Removing wm=0/wms or changing any parameter of the URL brings the watermark back.

Keep the key server-side; never build these URLs in the browser. An invalid key throws an InvalidArgumentException.

Utility Methods

Available Parameters

Parameter Range Description
width 1-6000 Output width in pixels
height 1-6000 Output height in pixels
quality 1-100 JPEG/WebP quality (default: 95)
format jpg, png, webp Output format (default: webp)
fit cover, contain Resize mode (default: cover)
focal x-y-zoom Smart crop focal point
wm / wms 0 + signature Skip the visible watermark (set via withoutWatermark())

Testing

License

MIT License. See LICENSE for details.


All versions of fairu-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/cache Version ^10.0|^11.0|^12.0|^13.0
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 sushidev/fairu-sdk contains the following files

Loading the files please wait ...