jomweb/billplz-laravel

Laravel adapter for Billplz
132,867 36
Install
composer require jomweb/billplz-laravel
Latest Version:v4.0.0
PHP:^8.1
Laravel:10 · 11
Older releases:5 – 9
License:MIT
Last Updated:Mar 31, 2024
Links: GitHub  ·  Packagist
Maintainer: crynobone

Billplz adapter for Laravel

tests Latest Stable Version Total Downloads Latest Unstable Version License Coverage Status

Installation

To install through composer by using the following command:

composer require "jomweb/billplz-laravel"

Configuration

Next add the service provider in config/app.php.

'providers' => [

    // ...

    Billplz\Laravel\BillplzServiceProvider::class,

],

Aliases

You might want to add Billplz\Laravel\Billplz to class aliases in config/app.php:

'aliases' => [

    // ...

    'Billplz' => Billplz\Laravel\Billplz::class,

],

Billplz Configuration

Next add the configuration in config/services.php.

<?php 

return [

    // ...

    'billplz' => [
        'key' => env('BILLPLZ_API_KEY'),
        'version' => env('BILLPLZ_VERSION', 'v4'),
        'x-signature' => env('BILLPLZ_X_SIGNATURE'),
        'sandbox' => env('BILLPLZ_SANDBOX', false),
    ],
];

Usages

Creating Client

With jomweb/billplz-laravel you have the option to initiate the client using the following methods.

Facade
use Billplz\Laravel\Billplz;

$bill = Billplz::bill()->create( /* ... */ );
IoC
$bill = resolve('billplz')->bill()->create( /* ... */ );
Dependency Injection
use Billplz\Client;

// ...

public function createBill(Client $client)
{
    $bill = $client->bill()->create( /* ... */ );

}

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

644,549,754 9,698
laravel/framework

The Laravel Framework.

598,760,099 34,966
laravel/tinker

Powerful REPL for the Laravel framework.

507,193,856 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

423,477,751 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

403,217,078 4,664

Version History

Version Released PHP Laravel License
v4.0.0 ^8.1 ^10.0 || ^11.0 MIT
v3.3.0 ^8.0 ^9.0 || ^10.0 MIT
v3.2.0 ^8.0 ^9.0 || ^10.0 MIT
v3.1.0 ^8.0 ^9.0 MIT
v3.0.0 ^8.0 ^9.0 MIT