Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Installation

Aslam edited this page Mar 25, 2021 · 4 revisions

Laravel Bank BRI requires PHP 7.2-8.0. This particular version supports Laravel 6-8.

Version Laravel Version Minimum PHP Version
1.x.x 6.x - 8.x 7.2-8.0

Require this package with composer.

composer require aslam/laravel-bank-bri

Configuration file you can publish it with the following Artisan command

php artisan vendor:publish --provider="Aslam\Bri\Providers\BriServiceProvider"

Response

The API method returns an instance of \Aslam\Bri\Response, which provides a variety of methods that may be used to inspect the response:

method()->body() : string;
method()->toJson() : array|mixed;
method()->collect() :  // Illuminate\Support\Collection;
method()->status() : int;
method()->ok() : bool;
method()->successful() : bool;
method()->failed() : bool;
method()->serverError() : bool;
method()->clientError() : bool;
method()->header($header) : string;
method()->headers() : array;

Facades

use BriAPI

This package also exposes a helper function you can use if you are not a fan of Facades using

briapi()