PHPackages                             sukorenomw/rclient - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. sukorenomw/rclient

ActiveLibrary[HTTP &amp; Networking](/categories/http)

sukorenomw/rclient
==================

Roketin Engine API Client

v0.0.2(10y ago)019MITPHPPHP ^5.5.9 || ^7.0

Since Apr 27Pushed 10y ago1 watchersCompare

[ Source](https://github.com/sukorenomw/RClient)[ Packagist](https://packagist.org/packages/sukorenomw/rclient)[ RSS](/packages/sukorenomw-rclient/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

Roketin Client Template
=======================

[](#roketin-client-template)

[![Latest Version](https://camo.githubusercontent.com/3a5756abca88bd30cda80c23435572b3538f7f59a4602a4527b7a81cd86e7ebb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f73756b6f72656e6f6d772f52436c69656e742e7376673f7374796c653d666c61742d737175617265)](https://github.com/sukorenomw/RClient/releases)[![License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel/framework)[![Total Downloads](https://camo.githubusercontent.com/4c9a4b5cd414db41cba317fff995ff3052ece015dc2837f9a6453c9dd37a1b07/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73756b6f72656e6f6d772f52436c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sukorenomw/RClient)

RClient is standard client application to [Roketin API](http://www.roketin.com) to accelerate connecting and integrating basic feature of Roketin Engine API to client's website.

API Documentation
-----------------

[](#api-documentation)

Documentation for the Roketin API can be found on the [Documentation](http://docs.rengine.apiary.io/#).

Installation
------------

[](#installation)

### Laravel 5

[](#laravel-5)

```
"require": {
    "laravel/framework": "5.0.*",
    "sukorenomw/rclient": "dev-master"
}
```

Next, run the Composer update command from the Terminal:

```
composer update

or

composer update "sukorenomw/rclient"

```

CONFIGURATION
-------------

[](#configuration)

1. Open config/app.php and addd this line to your Service Providers Array

```
  Roketin\Providers\RoketinServiceProvider::class,
```

2. Open config/app.php and addd this line to your Aliases

```
    'Roketin' => Roketin\Facades\RoketinFacade::class
```

3. Publish the config using the following command:

    $ php artisan vendor:publish --provider="Roketin\\Providers\\RoketinServiceProvider"
4. Create an .env file based on .env.example file and change the value based on client credentials

```
  APP_ENV=local
  APP_DEBUG=true
  APP_KEY=somestringrandom
  APP_URL=http://localhost

  ROKETIN_API=http://dev.roketin.com/api/v2.2/
  ROKETIN_PUBLIC=http://dev.roketin.com/

  ROKETIN_TOKEN=aBCd1234
  ROKETIN_USERNAME=roketin
  ROKETIN_RX=4241639264053293060625251241576152575759

  VERITRANS_SERVER=494DKU0E71241K7BC15597DACA94D1F43
  VERITRANS_ENVIRONMENT=sandbox

```

HOW TO USE
----------

[](#how-to-use)

- [Basic Usage](#basic)
- [Conditions](#conditions)
- [Sorting](#sorting)
- [Grouping](#grouping)
- [Pagination](#pagination)
- [Shipping](#shipping)
- [Sales Order](#order)
- [Subscribe](#subscribe)
- [Message](#message)
- [Voucher](#voucher)
- [Users](#user)

Basic
-----

[](#basic)

You can call a Roketin Object by using: **Roketin::model()-&gt;get()**

```
    use Roketin;

    $menus = Roketin::menus()->get();
    $posts = Roketin::posts()->get();
    $products = Roketin::products()->get();
    etc..
```

Fethcing single object with id/slug/etc:

```
    /*
     * Same as fetching object, but in singular form (without 's')
     * the second argument can be id or slug or etc ..
     * this is dynamic function call to Roketin Engine API
     */

    $home = Roketin::menu('home')->get();
    $post = Roketin::post('latest-update')->get();
```

Conditions
----------

[](#conditions)

Fetching object with simple where conditions:

```
    /**
     * @param $field
     * @param $operation
     * @param $value
     */

    $posts = Roketin::posts()->where('title','like','vacation')->get();

    //NOTE :
    //It doesn't need to add % if using 'like' operator
```

Fetching object with simple orWhere conditions:

```
    /**
     * @param $field
     * @param $operation
     * @param $value
     */

    $posts = Roketin::posts()
                        ->where('title','like','vacation')
                        ->orWhere('title','like','holiday')
                        ->get();

    //NOTE :
    //It doesn't need to add % if using 'like' operator
```

Advance where orWhere grouping conditions:

```
    /**
     * @param $field
     * @param $operation
     * @param $value
     */

    $posts = Roketin::posts()
                        ->where('title','like','vacation')
                        ->orWhere('title','like','holiday')
                        ->where('date','>=','2016-04-10')
                        ->where('date','sortBy('created_at')->get();
    $posts = Roketin::posts()->sortBy('created_at','DESC')->get();
```

Grouping
--------

[](#grouping)

Fetch a Roketin Object API by grouping on it's field:

```
    /*
     * grouping object before fetch
     *
     * @param $field
     * /

    $posts = Roketin::posts()->groupBy('created_at')->get();
```

Pagination
----------

[](#pagination)

Paginating fetch object

```
    /*
     * paginate object before fetch
     *
     * @param $size default value is 10
     * @param $page (optional)
     * /

    $posts = Roketin::posts()->paginate(10)->get();
    $posts = Roketin::posts()->paginate(10,2)->get();
```

Shipping
--------

[](#shipping)

Get all available countries:

```
    $countries = Roketin::shipping()->countries()
```

Get all available provinces (currently available in Indonesia only):

```
    $province = Roketin::shipping()->province()
```

Get all available city (currently available in Indonesia only):

```
    /*
     * @param $provinceid
     */

    $cities = Roketin::shipping()->province(9)->cities()
```

Calculate shipping costs:

```
    /*
     * @param $destination = city id
     * @param $courier = JNE/TIKI/POS
     * @param $weight = item weight in KG (optional) default value 1
     * @param $origin = city id
     */

    $costs = Roketin::shipping()->cost(23, 'JNE')
```

Order
-----

[](#order)

Create sales order:

```
    /*
     * @param array $generalData
     * @param array $customerData
     * @param array $products
     */

     $generalData = [
            "notes"         => "some string here",
            "is_email_only" => true,
     ];

     $customerData = [
            "first_name" => "Sukoreno",
            "last_name"  => "Mukti",
            "phone"      => "+6281910513704",
            "email"      => "sukorenomw@gmail.com",
     ];

     $products = [
         [
             "id"         => "2623",
             "qty"        => "1",
             "sku"        => "ADVHEL001",
             "price_type" => "retail_price",
         ],
     ];
    $order = Roketin::order()->create([], 'JNE')
```

> **Note:**
>
> - For detailed attribute, see sales order API documentation [HERE](http://docs.rengine.apiary.io/#reference/sales-order/sales-order)

---

Confirm payment order:

```
    /*
     * @param $invoice_number
     * @param $payment_type
     * @param $total
     * @param $customer_name
     * @param $transaction_number
     * @param Image $image
     * @param null $bank_account
     * @param null $paid_date
     */

    //you can create image for bank transfer that
    //showing transfer is success
    //by using Image::make()
    $img = Image::make(Input::file('image'))

    $payment = Roketin::order()
                ->confirm('SI16041300058',
                          'TRANSFER',
                          '150000',
                          'Sukoreno Mukti',
                          'TRX-123',
                          $img,
                          '0853909090')
```

---

Void an Sales Order and it's invoice:

```
    /*
     * @param $invoice_number
     */

    $order = Roketin::order()->void('ASD02262016')
```

Subscribe
---------

[](#subscribe)

Submit a subscription email:

```
    /*
     * @param $email
     */

    $subscribe = Roketin::subscribe('somebody@anythin.com')
```

Message
-------

[](#message)

Send a message to Roketin Engine Inbox:

```
    /*
     * @param $sender_name
     * @param $sender_email
     * @param $sender_phone
     * @param $message_title
     * @param $message_body
     */

    $msg = Roketin::message()
                    ->send(
                    'reno',
                    'smw@mailinator.com',
                    '123123',
                    'test mesage',
                    'hai')
```

Vouchers
--------

[](#vouchers)

Check validity of a voucher:

```
    /*
     * @param $code
     * @param $voucher_type (optional), default = null
     * voucher type can be giftvoucher (voucher in
     * exchange to money nominal) or
     * other (voucher to exchange to free product)
     * default is voucher_type is other
     */

    $check = Roketin::voucher()->check('AS123D')
```

---

invalidate a voucher (use voucher):

```
    /*
     * @param $voucher_code
     * @param $voucher_type (optional) default is other
     * @param $used_by (optional) default is logged in user
     */

    $check = Roketin::voucher()->invalidate('AS123D')
```

User
====

[](#user)

Register new user:

```
    /*
     * @param $first_name
     * @param $last_name
     * @param $email
     * @param $phone
     * @param $password
     * @param $password_confirmation
     * @return user object
     */

    $user = Roketin::user()->register('first_name', 'last_name', 'email', 'phone', 'password', 'password_confirmation');
```

User activation:

```
    /*
     * @param $token
     * @return true if success activation
     * @return error object if present
     */

    $activation = Roketin::user()->activate('token');
```

Resend activation code to email:

```
    /*
     * @param $email
     * @return true if success activation
     * @return error object if present
     */

    $resend = Roketin::user()->resendActivation('someone@somthing.com');
```

Forgot password (generate and send token to user email):

```
    /*
     * @param $email
     * @return true if success activation
     * @return error object if present
     */

    Roketin::user()->forgot('someone@somthing.com');
```

Reset password:

```
    /*
     * @param $token
     * @param $password
     * @param $password_confirmation
     * @return true if success activation
     * @return error object if present
     */

    Roketin::user()->resetPassword('token','asdf','asdf');
```

Login:

```
    /*
     * @param $email
     * @param $password
     * @param $type (optional) default = user, available = vendor
     * @return true if success activation
     * @return error object if present
     */

    Roketin::auth()->login('somebody@somthing.com','asdf');
```

Current User:

```
    /*
     * @return user object
     */

    Roketin::auth()->user();
```

Update user data:

```
    /*
     * @return user object
     */

    Roketin::user()->update(['first_name' => 'John']);
```

> **Note:**
>
> - For detailed attribute, see sales order API documentation [HERE](http://docs.rengine.apiary.io/#reference/users/update)

Get transaction history data:

```
    /*
     * @return user object
     */

    Roketin::user()->transactionHistory()->get();
```

> **Note:**
>
> - you can also use where(), orWhere(), etc query with this method

Logout:

```
    /*
     * @return boolean
     */

    Roketin::auth()->logout();
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3716d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11178302?v=4)[sukorenomw](/maintainers/sukorenomw)[@sukorenomw](https://github.com/sukorenomw)

---

Top Contributors

[![sukorenomw](https://avatars.githubusercontent.com/u/11178302?v=4)](https://github.com/sukorenomw "sukorenomw (15 commits)")

---

Tags

apiclientlaravelrestengineapiclient

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sukorenomw-rclient/health.svg)

```
[![Health](https://phpackages.com/badges/sukorenomw-rclient/health.svg)](https://phpackages.com/packages/sukorenomw-rclient)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1232.2k16](/packages/fleetbase-core-api)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[dreamfactory/df-core

DreamFactory(tm) Core Components

1652.0k38](/packages/dreamfactory-df-core)[laragear/api-manager

Manage multiple REST servers to make requests in few lines and fluently.

162.0k](/packages/laragear-api-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
