Download the PHP package sahifa/laravel without Composer

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

Sahifa for Laravel

Render Blade views to PDF with Arabic text that actually works: joined letters, correct word order, mixed Arabic and English, with Arabic fonts ready. Rendered by Chromium on Sahifa's servers in Saudi Arabia, so there is no browser to install and nothing to configure in your Laravel app.

If you came here because dompdf shows Arabic as ???? or as disconnected letters, this is the fix: dompdf does not shape Arabic, a browser engine does.

Installation

Add your key to .env (get a free one at sahifa.dev: 100 renders a month, no card needed):

The service provider and the Sahifa facade are registered automatically. To change the defaults, publish the config:

Requirements: PHP 8.2+, Laravel 12 or 13.

Usage

PDF from a Blade view

Inside the page footer and header, {{page}} and {{total}} are replaced with page numbers. In a Blade file write them as @{{page}} so Blade leaves them alone.

PDF from HTML or a URL

All PDF options are passed through: format, landscape, margin, header, footer, css, javascript, delay, wait_for, pages, zoom.

Screenshots

See the screenshot options.

Mail attachments

An Arabic invoice view

Errors and retries

Failures throw Sahifa\Laravel\Exceptions\SahifaException with ->status, ->errorCode and the API's message. Busy and rate-limit responses (429, 502, 503, 504) and network errors are retried (SAHIFA_RETRIES, default 3), waiting for Retry-After.

Testing your app

The package uses Laravel's HTTP client, so Http::fake() works:

Why Sahifa

Documentation · Examples in five languages · Pricing · Support: [email protected]

MIT License. Sahifa is a service of Yimello LLC.


All versions of laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/view Version ^12.0|^13.0
guzzlehttp/guzzle Version ^7.5
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 sahifa/laravel contains the following files

Loading the files please wait ...