Download the PHP package lenorix/laravel-beel without Composer

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

Laravel BeeL

Latest Version on Packagist Tests Total Downloads Plumb score

Laravel integration for BeeL, the Spanish invoicing API with VERI*FACTU built in.

It wraps the lenorix/beel-sdk client with Laravel config, Laravel's HTTP client and a ready-made webhook endpoint.

Installation

Add your BeeL settings to config/services.php:

Credentials live in config/services.php, like any Laravel service. Everything else (webhook route, cache, HTTP and PDF settings) lives in config/beel.php, which you only publish to change a default: php artisan vendor:publish --tag="beel-config".

Then check everything is in place:

It is read-only. It reports problems with the key, the company, webhooks and the cache. To check one tenant, pass --api-key, --company-id and --account-id (the key shows in ps and shell history).

Usage

Get a client from BeelManager (or the LaravelBeel facade):

Credentials come from config. You can pass them per call, which is handy for multi-tenant apps:

To take the defaults from somewhere else, bind your own Contracts\CredentialsResolver.

Webhooks

The package registers POST /beel/webhook and verifies BeeL's signature for you. To create the subscription in BeeL and save its secret to .env:

Then listen to the event:

Three rules:

$event->typed() returns the SDK's typed model of the event. $event->data is the raw array.

Each known type also has its own event, dispatched right after, so you can listen to just what you need. Its data() is typed, and $event->webhook is the BeelWebhookReceived:

For example, to archive every invoice PDF as soon as BeeL generates it:

The job downloads it in the background and waits if the PDF isn't ready yet. Dispatching it twice for the same event is harmless.

If you use Spatie Media Library, chain the job with the step that adds the PDF to your model. storePdf() verifies the download, which addMediaFromUrl() wouldn't:

The second step runs only once the PDF is stored, even if the job had to wait for BeeL. The temporary file goes to a shared disk (s3 here), so it works even when queue workers run on different servers.

Testing

Tests never reach BeeL: all traffic goes through Laravel's HTTP client. BeelFake builds responses shaped like BeeL's:

It fakes operations by name, so your tests don't depend on BeeL's routes. For anything else, ->on('GET', '/v1/companies/{company}/series', ...) or plain Http::fake() with BeelFake::ok(), page() and error().

To test your webhook listeners, use the InteractsWithBeelWebhooks trait. It posts a correctly signed delivery:

Set beel.http.retries to 0 in tests: otherwise a faked 429 or 5xx is retried, with real waits.

More features

Each of these is documented in its PHPDoc and in config/beel.php:

AI guidelines (Laravel Boost)

The package ships Laravel Boost guidelines and a beel-invoicing skill for AI coding agents. They cover this package, the SDK, the BeeL API and the VERI*FACTU rules. Run php artisan boost:install to pick them up.

Requirements

License

Released into the public domain under The Unlicense. See LICENSE.md.


All versions of laravel-beel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
illuminate/contracts Version ^13.0
lenorix/beel-sdk Version ^0.6.2
spatie/laravel-package-tools Version ^1.16
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 lenorix/laravel-beel contains the following files

Loading the files please wait ...