ghanem/reloadly

A package that provides an interface between Laravel and reloadly API

V1.0 2021-10-04 14:22 UTC

This package is auto-updated.

Last update: 2024-05-04 20:29:55 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

A package that provides an interface between Laravel and Reloadly API, includes Gifs.

Installation

You can install the package via composer:

composer require ghanem/reloadly

now you need to publish the config file with:

php artisan vendor:publish --provider="Ghanem\Reloadly\ReloadlyServiceProvider" --tag="config"

how to use

import Reloadly Facade

<?php
....

use Ghanem\Reloadly\Facades\Reloadly;

class PostController extends Controller
{
    public function makeReport()
    {
        $countries =  Reloadly::countries();
    }

available methods

Get all Countries

Reloadly::countries();

Get Country By Iso Code

Reloadly::countryByIsoCode('eg');

Get all Operators

Reloadly::operators();
// filter by country Iso Code
Reloadly::operators('eg');

Get Operator By Id

Reloadly::operatorById(1);

auto Detect Operators for number by Iso Code

Reloadly::autoDetectOperator('eg', '+201013001322');

get balances

Reloadly::balances();

make airtime recharge

Reloadly::createTransaction("120", "15", ['countryCode' => 'EG', 'number' => '1013001322']);

Get all Transactions

Reloadly::transactions();

Get Transaction By Id

Reloadly::transactionById(20818);