PHPackages                             roketin/stellar-connect - 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. roketin/stellar-connect

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

roketin/stellar-connect
=======================

Roketin Stellar API Client

v0.0.15(6y ago)0311MITPHPPHP ^5.5.9 || ^7.0

Since Aug 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/roketin/stellar-connect)[ Packagist](https://packagist.org/packages/roketin/stellar-connect)[ RSS](/packages/roketin-stellar-connect/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (7)Versions (17)Used By (0)

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

[](#roketin-client-template)

[![Latest Version](https://camo.githubusercontent.com/76dc381bbf0eab13fca2b62198ff5280b5135375443391199d5aee3d1ef9867d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f726f6b6574696e2f7374656c6c61722d636f6e6e6563742e7376673f7374796c653d666c61742d737175617265)](https://github.com/roketin/stellar-connect/releases)[![License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel/framework)[![Total Downloads](https://camo.githubusercontent.com/27f613268acf4659b7194c0d39d97b72e4c0c94fc34a5c9e353c262b3a6061da/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726f6b6574696e2f7374656c6c61722d636f6e6e6563742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/roketin/stellar-connect)

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.*",
        "roketin/stellar-connect": "v0.0.15"
    }
```

Next, run the Composer update command from the Terminal:

```
composer update

or

composer require "roketin/stellar-connect"

```

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. Please add to .env file

```
  ROKETIN_API=https://api.stellar.roketin.com
  ROKETIN_PUBLIC=https://api.stellar.roketin.com

  ROKETIN_API_KEY=api_key

```

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

[](#how-to-use)

- [Basic Usage](#basic)
- [Show](#show)
- [Conditions](#conditions)
- [Sorting](#sorting)
- [Pagination](#pagination)
- [Shipping](#shipping)
- [Social Media](#social-media)
- [Company Detail](#company-detail)
- [Page and Post](#page-and-post)
- [Expedition](#expedition)
- [Bank](#bank)
- [Sales Order](#order)
- [Message](#message)
- [Subscribe](#subscribe)
- [Vouchers](#vouchers)
- [Members](#member)
- [Members-Address](#member-address)
- [Members-Contact](#member-contact)
- [Members-Wishlist](#member-wishlist)
- [Others](#others)

Basic
-----

[](#basic)

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

```
    use Roketin;

    $menus = Roketin::menu()->list()->get();
    $pages = Roketin::page()->list()->get();
    $posts = Roketin::post()->list()->get();
    $products = Roketin::product()->list()->get();
    $variants = Roketin::variant()->list()->get();
    $categories = Roketin::category()->list()->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
     * this is dynamic function call to Roketin Engine API
     */

    $menu = Roketin::menu()->show('asc-123123-asxzc')->get();
    $page = Roketin::page()->show('home')->get();
    $post = Roketin::post()->show('lastest-update')->get();
```

Show
----

[](#show)

If you want get the details

```
    /**
     * @param $id
     */

    $products = Roketin::product()->show($id)->get();
    etc..
```

Conditions
----------

[](#conditions)

Fetching object with simple where conditions:

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

    $posts = Roketin::post()->list()->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::post()
                        ->list()
                        ->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::post()
                        ->list()
                        ->where('title','like','vacation')
                        ->orWhere('title','like','holiday')
                        ->where('date','>=','2016-04-10')
                        ->where('date','list()->sortBy('created_at')->get();
    $posts = Roketin::post()->list()->sortBy('created_at', 'DESC')->get();
```

Pagination
----------

[](#pagination)

Paginating fetch object

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

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

Shipping
--------

[](#shipping)

Get all available countries:

```
    $countries = Roketin::country()->list()->get();
```

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

```
    /**
     * @param $country_id
     */

    $province = Roketin::province()->list('ID')->get();
```

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

```
    /**
     * @param $province_id
     */

    $cities = Roketin::city()->list(9)->get();
```

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

```
    /**
     * @param $city_id
     */

    $districts = Roketin::district()->list(9)->get();
```

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

```
    /**
     * @param $district_id
     */

    $subDistricts = Roketin::subDistrict()->list(9)->get();
```

Get free shipping information

```
    $freeShipping = Roketin::shipping()->freeShipping()->show();
```

Social Media
------------

[](#social-media)

Get all available Social Media:

```
    $medias = Roketin::socialMedia()->list()->get();
```

Company Detail
--------------

[](#company-detail)

Get all available countries:

```
    $company = Roketin::company()->detail()->get();
```

Page and Post
-------------

[](#page-and-post)

Get all Menu:

```
    $menus = Roketin::menu()->list()->get();
```

Get all Page:

```
    $pages = Roketin::post()->list()->get();
```

Get all Post:

```
    $posts = Roketin::post()->list()->get();
```

Get all Category Post:

```
    $categories = Roketin::categoryPost()->list()->get();
```

Expedition
----------

[](#expedition)

Get all available Expedition:

```
    $expeditions = Roketin::expedition()->list()->get();
```

Get all available Expedition:

```
    $expeditions = Roketin::expedition()->service()->list()->get();
```

Get Delivery Cost (Deprecated, use expedition service - cost below instead)

```
    $delivery = [
        'origin'        => '501',
        'destination'   => '574',
        'weight'        => 1700,
        'courier'       => 'jne'
    ];

    $expeditions = Roketin::expedition()->cost($delivery);
```

Get Delivery Cost this version of Get Delivery Cost has been implemented with freeshipping support

```
    $delivery = [
            "origin" => "78",
            "originType" => "city",
            "destination" => "153",
            "destinationType" => "city",
            "weight" => 1700,
            "courier" => "jne",
            "service" => "YES",
            "purchase" => 8000000
        ];
    $expeditions = Roketin::expedition()->service()->cost($delivery);
    if ($expeditions->meta->status_code == 202) {
        //Covered by freeshipping
    }
```

Bank
----

[](#bank)

Get all available Bank:

```
    $expeditions = Roketin::bank()->list()->get();
```

Order
-----

[](#order)

Create sales order:

```
    /**
     * @param array $generalData
     * @param array $customerData
     * @param array $products
     * @param $bcc(optional), default = null
     */

    $order = [
        "member_id"             => "5b55af8c6f6bfc0c74007955",
        "order_at"              => "2009-09-09",
        "is_create_invoice"     => true,
        "due_date_invoice"      => "2009-09-09",
        "message_from_customer" => "pesan",
        "name"                  => "adin",
        "email"                 => "test@gmail.com",
        "phone"                 => "123123123",
        "address"               => "Bandung",
        "send_invoice"          => true,
        "shipping"              => true,
        "expedition_code"       => "jne",
        "service_code"          => "oke",
        "discounts"             => 10000,
        "voucher_code"          => "voucher12009",
        "tax"                   => 10,
        "shipping_cost"         => 0,
        "sender_id"             => "5b3309076f6bfc0460000b73",
        "products"              =>[
            {
                "name"          => "Sepatu Merah",
                "product_id"    => "5b6184386f6bfc3d18003eca",
                "quantity"      => 1,
                "price"         => 200000,
                "discount"      => 0,
                "add_cost"      => 0,
                "weight"        => 100
            },
            {
                "name"          => "Sendal Merah",
                "product_id"    => "5b6184386f6bfc3d18003ecb",
                "quantity"      => 1,
                "price"         => 30000,
                "discount"      => 0,
                "add_cost"      => 0,
                "weight"        => 100
            },
            {
                "name"          => "Swallow",
                "product_id"    => "5b6184386f6bfc3d18003ecc",
                "quantity"      => 1,
                "price"         => 50000,
                "discount"      => 0,
                "add_cost"      => 0,
                "weight"        => 100
            }
        ]
    ];

    $order = Roketin::salesOrder()->store($order);
```

Search sales order:

```
    /**
     * @param $query
     */

    $order = Roketin::salesOrder()->search($query)->get()
```

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

---

Create payment order:

```
    /**
     * @param $payment
     */

    $image = Roketin::image()->send($request->file('image'));

    $payment = [
        "sales_invoice_id"      => "8b2ac9dc-85b1-49fe-b609-3e0539af2eb6",
        "payment_type"          => "transfer",
        "paid_at"               => "2009-09-09",
        "nominal"               => 10000,
        "company_bank_id"       => "8b29e54e-ba87-487a-9fc2-b8898d902074",
        "bank_name"             => "adin",
        "account_number"        => "0189320123",
        "account_name"          => "adin",
        "card_number"           => "01982301",
        "credit_card_type"      => "credit",
        "transaction_number"    => "T001092381",
        "attachment"            => $image
    ];

    $payment = Roketin::payment()->confirm($payment);
```

Message
-------

[](#message)

Send a message to Roketin Engine Inbox:

```
    /**
     * @param $sender_name
     * @param $sender_email
     * @param $sender_phone
     * @param $message_title
     * @param $message_body
     * @param $bcc(optional), default = null
     * @param $send_message(optional), default = false
     */

    $msg = Roketin::message()->send(
                    'test',
                    'test@mailinator.com',
                    '123123',
                    'test mesage',
                    'hai',
                    ['bcc@mailinator.com'],
                    false
    );
```

Subscribe
---------

[](#subscribe)

Send a Subscribe to Roketin Engine Subscribe:

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

    $msg = Roketin::subscribe()->send('test@mailinator.com')
```

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
     */
    $data = [
        'code'           => 'AS123D',
        'total_purchase' => 10000
    ];

    $check = Roketin::voucher()->check($data)
```

Member
------

[](#member)

Register new member

```
    /*
    * REGISTER
    *
    * register() will return a RMember class which you can use to futher manipulate member
    * register() will throw \Exception if something went wrong (Eg:email already used)
    */
    $register_data = [
        'first_name' => 'Ali', //required
        'last_name' => 'of Ababwa',
        'email' => 'ali@ababwa.com', //required
        'password' => 'secretPassword123!', //required
        'password_confirmation' => 'secretPassword123!', //required
        'addresses' => [ //addresses can be empty [] or null
            [
                'address_type' => 'perkantoran', //address_type can be anything, will be created if not yet exist
                'address' => 'Jl. Asia Afrika No.116, RW.01, Paledang, Kec. Lengkong, Kota Bandung, Jawa Barat 40261',
                'country' => [
                    'label' => 'Indonesia',
                    'value' => 'ID'
                ],
                'province' => [
                    'label' => 'Jawa Barat',
                    'value' => '9'
                ],
                'city' => [
                    'label' => 'Kota Bandung',
                    'value' => '23'
                ],
                'district' => [
                    'label' => 'Kota Cibiru',
                    'value' => '352'
                ],
                'postal_code' => '40524',
                'direction' => 'Depan simpang lima kiri',
                'coordinate' => [
                    'lat' => 12.1232323,
                    'lng' => 23.1232434
                ],
                'main_address' => true,
                'active_status' => true,
                'store_address' => false,
            ], [ //One member can have more than one address
                'address_type' => 'pantai',
                'address' => 'Pangandaran Beach',
                'country' => [
                    'label' => 'Indonesia',
                    'value' => 'ID'
                ],
                'province' => [
                    'label' => 'Jawa Barat',
                    'value' => '9'
                ],
                'city' => [
                    'label' => 'Kota Bandung',
                    'value' => '23'
                ],
                'district' => [
                    'label' => 'Kota Cibiru',
                    'value' => '352'
                ],
                'postal_code' => '40524',
                'direction' => 'Lurus terus',
                'coordinate' => [
                    'lat' => 12.1232323,
                    'lng' => 23.1232434
                ],
                'main_address' => false,
                'store_address' => true,
                'active_status' => true,
            ]
        ],
        'contacts' => [ //contact can be empty or null
            [ //shown bellow are list of all posible contact
                "contact_type" => 1, //phone number
                "phone_number" => "081111112222",
                "emergency_contact" => true,
                "whatsapp" => true,
                "line" => true,
                "main_contact" => true,
                "active_status" => true
            ], [
                'contact_type' => 2, //email
                'email' => 'athuria@pendragon.com',
                'main_contact' => true,
                'active_status' => true
            ], [
                "contact_type" => 3, //skype
                "skype_id" => "1231243132134213",
                "main_id" => true,
                "active_status" => true,
            ], [
                "contact_type" => 4, //website
                "url" => "https://www.google.com",
                "active_status" => true,
            ], [
                "contact_type" => 5, //contact Person
                "name" => "Eve",
                "position" => "Secretary",
                "start_date" => "2019-08-01 15:03:00",
                "end_date" => "2019-08-17 15:03:00",
                "until_now" => true,
                "description" => "lorem ipsum"
            ]
        ]
    ];
    try {
        $member = Roketin::member()->register($register_data);
    } catch(\Exception $exception) {
        return response()->json(json_decode($exception->getMessage()));
    }

    //If you want roketin to automagicaly send email confirmation and handle it for you, set the second argument of register() to true

    try {
        $member = Roketin::member()->register($register_data, true);
    } catch(\Exception $exception) {
        return response()->json(json_decode($exception->getMessage()));
    }

    //You can ask roketin to resend email confirmation by using

    $respone = $member->resendEmail();

    //If you don't set it to true you need to handle email confirmation yourself by following these instruction;
    //1. register() will throw an exception telling you that register has succeded. In the response thrown by register() will also be information about member_id and email_confirmation_token, you will use it for the next step
    //2. you would want to send a custom email to the member that contail link with format '{your-custom-url}/handle-confirmation/{id}/{token}' just like forgot password
    //3. In the aforementioned link, you would want to call

    $response = Roketin::member()->handleEmailConfirmation($id, $token);

    //stellar will handle the rest
```

Login member by email

```
    /*
     * LOGIN
     * Login App
     *
     * Login() will return a RMember class which you can use to manipulate member
     * login() will throw \Exception if something went wrong (Eg:wrong credential)
     */
    $credential = [
        'email' => 'ali@ababwa.com',
        'password' => 'secretPassword123!'
    ];

    try {
        $member = Roketin::member()->login($credential);
    } catch(\Exception $exception) {
        return response()->json(json_decode($exception->getMessage()));
    }

    //You can get RMember class for client's current session by using member - getSession
    //NOTE : The routes that call register, login, getSession, and logout have to be within the 'web' middleware group in order to use these feature below AND DONT disrupt the application flow like using dd() or die()

    try {
        $member = Roketin::member()->getSession();
    } catch(\Exception $exception) {
        return response()->json(json_decode($exception->getMessage()));
    }

    //And log out by using member - logout
    $response = Roketin::member()->logout();
```

Get member detail

```
    /*
     * SHOW
     * There's two way you can get member's detail;
     */
    //1. By its id
    $member_data = Roketin::member()->show('5d4a9d3ca051e83db4000148')->get();
    //2. Or, by its object
    $member_data = $member->show()->get();
```

Update member's profile

```
    /*
     * UPDATE PROFILE
     *
     * There's also two way you can change member's detail
     * Note : To change its contact, and address, use their respective update method
     * update() will throw \Exception if something went wrong (Eg:wrong field)
     */
    $change_data = [
        'first_name' => 'Ali',
        'last_name' => 'of Ababwa',
    ];

    try {
        //1. By its id
        Roketin::member()->update($change_data, '5d4a9d3ca051e83db4000148');
        //2. Or, by its object
        $member->update($change_data);
    } catch(\Exception $exception) {
        return response()->json(json_decode($exception->getMessage()));
    }
```

Change member's password

```
    /*
     * CHANGE PASSWORD
     *
     * changePassword() will throw \Exception if something went wrong (Eg:failed password confirmation)
     */
    $change_data_pass = [
        'old_password' => 'secretPassword123*',
        'new_password' => 'secretPassword123*',
        'new_password_confirmation' => 'secretPassword123*'
    ];

    try {
        $member->changePassword($change_data_pass);
    } catch(\Exception $exception) {
        return response()->json(json_decode($exception->getMessage()));
    }
```

Forgot password handler

```
    /*
     * Member - Forgot Password
     *
     * forgotPassword() will return member_id and a token to be used in handle forgot_password
     * if you want stellar to automagically send email and handle forgot password for you, set $send_email to true
     * forgotPassword() will throw \Exception if something went wrong (Eg: invalid email)
     */
    try {
        $credential = Roketin::member()->forgotPassword('ali@ababwa.com');
    } catch(\Exception $exception) {
        return response()->json(json_decode($exception->getMessage()));
    }

    //You would want to send an email that carries $credential.user_id, $credential.token and a link to a website that handle forgot password request,
    //There you would want to call this method using the aforementioned values in $credential as parameters

    $params = [
        'new_password' => 'notSoSecret123!',
        'new_password_confirmation' => 'notSoSecret123!',
    ];
    try {
        Roketin::member()->handleForgotPassword($params, $credential->data->user_id, $credential->data->token);
    } catch(\Exception $exception) {
        return response()->json(json_decode($exception->getMessage()));
    }
```

Get Order History of a Member

```
    $order = $member->salesOrder()->list()->get();
```

Member-Address
--------------

[](#member-address)

Get member's addresses

```
    /*
     * INDEX
     *
     * There's two way you can index address
     * Everything else is as usual
     */
    //1. Show all address recorded for your company
    $address_data = Roketin::address()->list()->get();

    //2. Show only the address that a member have
    $address_data = $member->address()->list()->get();
```

Show detailed member's addresses one by one

```
    /*
     * SHOW
     * Show the detailed information of an address
     *
     * There's two way you can show address
     * Everything else is as usual
     */
    //1. Show resource as usual
    $address_data = Roketin::address()->show('5d4a9d3ca051e83db4000149')->get();

    //2. Just like above, but with stricker security, only member that have the address can show the resource
    $address_data = $member->address()->show('5d4a9d3ca051e83db4000149')->get();
```

Store a new address for a member

```
    /*
     * STORE
     * Store an address to scm and pair it with the designated member
     *
     * There's two way you can store address
     */
    $params = [
        'address_type' => 'perkantoran',
        'address' => 'TAIPEI 102, 101th floor',
        'country' => [
            'label' => 'Indonesia',
            'value' => 'ID'
        ],
        'province' => [
            'label' => 'JAWA BARAT',
            'value' => '32'
        ],
        'city' => [
            'label' => 'KABUPATEN BANDUNG',
            'value' => '3204'
        ],
        'district' => [
            'label' => 'CIDEWAY',
            'value' => '3204010'
        ],
        'postal_code' => '40524',
        'direction' => 'Bunderan tamrin jangan belok belok',
        'coordinate' => [
            'lat' => 12.1232323,
            'lng' => 23.1232434
        ],
        'main_address' => false,
        'store_address' => false,
        'active_status' => true,
    ];
    //1. Using member's id
    $result = Roketin::address()->store($params, '5d4a9d3ca051e83db4000148');
    //2. Using member's object
    $result = $member->address()->store($params);
```

Update an existing address of a member

```
    /**
     * UPDATE
     * Update an address
     *
     * There's two way you can store address,
     * But both requires address_id as parameters
     * because member - address is one - many relationship
     */
    $params = [
        'address' => 'TAIPEI 101, 101th floor penthouse',
        'main_address' => true,
        'store_address' => false,
    ];
    //1. Directly using Roketin Facade
    $result = Roketin::address()->update($params, '5d503a1ca051e83c50001ff3');
    //2. Using member's object, same as above but with more security,
    //   only address coresponding member can update/change it
    $result = $member->address()->update($params, '5d41343aa051e856940024aa');
```

Delete an existing address of a member

```
    /**
     * DESTROY
     * Delete an address from the database
     *
     * There's two way you can store address,
     * But both requires address_id as parameters
     * because member - address is one - many relationship
     */
    //1. Directly using Roketin Facade
    $result = Roketin::address()->destroy('5d4d4608a051e83e28004a03');

    //2. Using member's object, same as above but with more security,
    //   only address coresponding member can update/change it
    $result = $member->address()->destroy('5d3e7f9ca051e8bb8400ca00');
```

Member Contact
--------------

[](#member-contact)

Get member's contact

```
   /*
    * INDEX
    *
    * There's two way you can index contact
    * Everything else is as usual
    */
    //1. Show all contact recorded for your company
    $contact_data = Roketin::contact()->list()->get();

    //2. Show only the contact that a member have
    $contact_data = $member->contact()->list()->get();
```

Get contact's delailed information

```
    /*
     * SHOW
     * Show the detailed information of a contact
     *
     * There's two way you can show contact
     * Everything else is as usual
     */
    //1. Show resource as usual
    $contact_data = Roketin::contact()->show('5d523b89a051e83aa4006b16')->get();

    //2. Just like above, but with stricker security, only member that have the contact can show the resource
    $contact_data = $member->contact()->show('5d523b89a051e83aa4006b16')->get();
```

Store a new contact for a member

```
    /*
     * STORE
     * Store a contact to scm and pair it with the designated member
     *
     * There's two way you can store address
     */
    //Shown below are the alternatives for member store parameter
    $params = [
        "contact_type" => 1, //phone number
        "phone_number" => "081111112222",
        "emergency_contact" => true,
        "whatsapp" => true,
        "line" => true,
        "main_contact" => true,
        "active_status" => true
    ];
    $params = [
        'contact_type' => 2, //email
        'email' => 'athuria@pendragon.com',
        'main_contact' => true,
        'active_status' => true
    ];
    $params = [
        "contact_type" => 3, //skype
        "skype_id" => "1231243132134213",
        "main_id" => true,
        "active_status" => true,
    ];
    $params = [
        "contact_type" => 4, //website
        "url" => "https://www.google.com",
        "active_status" => true,
    ];
    $params = [
        "contact_type" => 5, //Contact Person
        "name" => "Eve",
        "position" => "Secretary",
        "start_date" => "2019-08-01 15:03:00",
        "end_date" => "2019-08-17 15:03:00",
        "until_now" => true,
        "description" => "lorem ipsum"
    ];

    //1. Using member's id
    $result = Roketin::contact()->store($params, '5d4a9d3ca051e83db4000148');
    //2. Using member's object
    $result = $member->contact()->store($params);
```

Update an existing contact of a member

```
    /**
     * UPDATE
     * Update a contact
     *
     * There's two way you can store contact,
     * But both requires address_id as parameters
     * because member - contact is one - many relationship
     */
    $params = [
        'contact_type' => 2,
        'email' => 'athuria@pendragon.com',
        'main_contact' => true,
        'active_status' => true
    ];
    //1. Directly using Roketin Facade
    $result = Roketin::contact()->update($params, '5d503a1ca051e83c50001ff3');
    //2. Using member's object, same as above but with more security,
    //   only contact's coresponding member can update/change it
    $result = $member->contact()->update($params, '5d41343aa051e856940024aa');
```

Delete an existing contact of a member

```
    /**
     * DESTROY
     * Delete a contact from the database
     *
     * There's two way you can store contact,
     * But both requires contact_id as parameters
     * because member - contact is one - many relationship
     */
    //1. Directly using Roketin Facade
    $result = Roketin::contact()->destroy('5d4d4608a051e83e28004a03');

    //2. Using member's object, same as above but with more security,
    //only contact's coresponding member can update/change it
    $result = $member->contact()->destroy('5d3e7f9ca051e8bb8400ca00');
```

Member-Wishlist
---------------

[](#member-wishlist)

Fetching wishlist :

```
    /*
    * INDEX
    *
    * There's two way you can fetch contact
    * Everything else is as usual
    */
    //1. Show all wishlist recorded for your company
    $wishlist = Roketin::wishlist()->list()->get();

    //2. Show only the wishlist that a member have
    $wishlist = $member->wishlist()->list()->get();
```

Fetching wishlist with simple where conditions:

```
    /**
     * @param $user_id
     */

    $wishlist = Roketin::wishlist()
                        ->list()
                        ->where('variant_id','like','abc1234')
                        ->get();
```

Add new wishlist:

```
    /**
     * STORE
     * Store a contact to scm and pair it with the designated member
     *
     * There's two way you can store wishlist
     * @param $user_id
     * @param $variant_id
     */

    $data = [
        "variant_id" => "5b55af8c6f6bfc0c74007955",
    ];
    // By member's id
    $wishlist = Roketin::wishlist()->store($data, '5b55af8c6f6bfc0c74007955');

    // By its object
    $wishlist = $member->store($data);
```

Delete wishlist:

```
    /**
     * Delete
     * Delete wishlist of a member
     *
     * There's two way you can store wishlist
     * @param $user_id
     * @param $variant_id
     */

    $data = [
        "variant_id" => "5b55af8c6f6bfc0c74007955",
    ];

    $wishlist = Roketin::wishlist()->delete($data, '5b55af8c6f6bfc0c74007955');
    //or
    $wishlist = $member->wishlist()->delete($data);
```

Others
------

[](#others)

Get Product Variants By Category:

```
    /**
     * @param $category_name
     * @return variants object
     */

    Roketin::product()->list()->categories('baju')->get();

    or

    Roketin::product()->list()->categories(['baju'])->get();
```

Get Product Variants By Tag:

```
    /**
     * @param $category_name
     * @return variants object
     */

    Roketin::product()->list()->tags('baju')->get();

    or

    Roketin::product()->list()->tags(['baju'])->get();
```

Get Product Sort By Relation:

```
    /**
     * @param $category_name
     * @return variants object
     */

    Roketin::product()->list()->sortBy('price', 'ASC', 'variants')->get();
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69% 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 ~25 days

Recently: every ~43 days

Total

15

Last Release

2465d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1852931?v=4)[Albert Christanto](/maintainers/albertchristanto)[@albertchristanto](https://github.com/albertchristanto)

---

Top Contributors

[![iman231](https://avatars.githubusercontent.com/u/31270946?v=4)](https://github.com/iman231 "iman231 (49 commits)")[![albertchristanto](https://avatars.githubusercontent.com/u/1852931?v=4)](https://github.com/albertchristanto "albertchristanto (21 commits)")[![hafidhrendyanto](https://avatars.githubusercontent.com/u/44597426?v=4)](https://github.com/hafidhrendyanto "hafidhrendyanto (1 commits)")

---

Tags

apiclientlaravelrestStellarapiclient

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/roketin-stellar-connect/health.svg)

```
[![Health](https://phpackages.com/badges/roketin-stellar-connect/health.svg)](https://phpackages.com/packages/roketin-stellar-connect)
```

###  Alternatives

[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[cybercog/youtrack-rest-php

YouTrack REST API PHP Client.

37149.2k3](/packages/cybercog-youtrack-rest-php)[laragear/api-manager

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

161.8k](/packages/laragear-api-manager)[rap2hpoutre/jacky

Opinionated REST JSON HTTP API client for laravel

174.4k](/packages/rap2hpoutre-jacky)

PHPackages © 2026

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