Integrate RajaOngkir API with laravel

Overview

Baca ini dalam bahasa: Indonesia

This is my package laravel-rajaongkir

Installation

You can install the package via composer:

composer require kodepintar/laravel-rajaongkir

You can publish and run the migrations with:

php artisan vendor:publish --provider="Kodepintar\LaravelRajaongkir\LaravelRajaongkirServiceProvider" --tag="laravel-rajaongkir-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --provider="Kodepintar\LaravelRajaongkir\LaravelRajaongkirServiceProvider" --tag="laravel-rajaongkir-config"

This is the contents of the published config file:

return [
    'API_KEY' => env('RAJAONGKIR_KEY', 'somerandomstring'),
    'ACCOUNT_TYPE' => env('RAJAONGKIR_TYPE', 'starter')
];

Usage

use Kodepintar\LaravelRajaongkir\LaravelRajaongkir as Ongkir;

$data = new Ongkir();
$data = $data->getProvince();
return $data;

Credits

this repo used template from spatie

License

The MIT License (MIT). Please see License File for more information.

You might also like...
A DigitalOcean API bridge for Laravel
A DigitalOcean API bridge for Laravel

Laravel DigitalOcean Laravel DigitalOcean was created by, and is maintained by Graham Campbell, and is a DigitalOcean PHP API Client bridge for Larave

A GitHub API bridge for Laravel
A GitHub API bridge for Laravel

Laravel GitHub Laravel GitHub was created by, and is maintained by Graham Campbell, and is a PHP GitHub API bridge for Laravel. It utilises my Laravel

A simple API documentation package for Laravel using OpenAPI and Redoc

Laravel Redoc Easily publish your API documentation using your OpenAPI document in your Laravel Application. Installation You can install this package

🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.
🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.

Telegram Bot API - PHP SDK Telegram Bot PHP SDK lets you develop Telegram Bots in PHP easily! Supports Laravel out of the box. Telegram Bot API is an

Twitch Helix API PHP Wrapper for Laravel
Twitch Helix API PHP Wrapper for Laravel

Laravel Twitch PHP Twitch Helix API Wrapper for Laravel 5+ ⚠️ Changes on May 01, 2020 Since May 01, 2020, Twitch requires all requests to contain a va

Spikkl API client for Laravel

Spikkl for Laravel Spikkl-php-laravel-client incorporates the Spikkl API into your Laravel or Lumen project. Requirements Get yourself a free Spikkl a

Twitter API for Laravel 5.5+, 6.x, 7.x & 8.x

Twitter for PHP Twitter API for Laravel 6.x, 7.x, 8.x (and new versions as they are released). Also supports other frameworks via PHP-DI (or feel free

MobilePay API for Laravel 9.x

MobilePay for PHP MobilePay API for Laravel 9.x Installation You can install the package via composer: composer require robert-hansen/mobilepay-php Yo

Laravel 8.x package wrapper library for Metatrader 5 Web API

Laravel 8.x package wrapper library for Metatrader 5 Web API

Comments
  • fix: data not sent on api call method post

    fix: data not sent on api call method post

    Saat ini apiCall mengirim data dalam bentuk urlencoded, jadi saat metode POST maka data tidak akan terkirim. Contoh adalah method getCost maka akan return Bad Request. PR ini fix hal tersebut

    opened by axmad386 0
  • refactor: simplify RajaOngkir API Call

    refactor: simplify RajaOngkir API Call

    Refactor Code

    This PR is include refactor and fixing typo. I add function apiCall to simplify for making request to rajaongkir API. Please add comment if something is not working or need change. Thank you

    Changes:

    • refactor: simplify switching base_url based on account type and api call
    • test: config test
    opened by axmad386 0
Releases(3.0.4)
  • 3.0.4(Sep 12, 2022)

  • 3.0.3(Sep 7, 2022)

  • 3.0.2(Jun 6, 2022)

    What's Changed

    • :bug: wrong hit on cost by @dinorain in https://github.com/kodepandai/laravel-rajaongkir/pull/10

    New Contributors

    • @dinorain made their first contribution in https://github.com/kodepandai/laravel-rajaongkir/pull/10

    Full Changelog: https://github.com/kodepandai/laravel-rajaongkir/compare/v3.0.1...3.0.2

    Source code(tar.gz)
    Source code(zip)
  • v3.0.1(Mar 22, 2022)

  • v3.0.0(Mar 22, 2022)

    What's Changed

    Refactor

    • change namespace from kodepintar to kodepandai
    • change facade accessor and change static to non static methods (#7)
    • support laravel 9

    Full Changelog: https://github.com/kodepandai/laravel-rajaongkir/compare/V2.0.0...v3.0.0

    Source code(tar.gz)
    Source code(zip)
  • V2.0.0(Nov 4, 2021)

    v2.0.0 (2021-11-04)

    Refactor

    • change namespace to RajaOngkir and remove unused dependencies

    BREAKING CHANGE

    provider renamed to Kodepintar\LaravelRajaOngkir\RajaOngkir

    v1.0.0 (2021-10-07)

    Docs

    • add README-ID.md (#4)
    • change readme (#2)

    Fix

    • update readme and fix load config (#5)

    Refactor

    • simplify RajaOngkir API Call (#1)
    Source code(tar.gz)
    Source code(zip)
  • 1.1(Oct 7, 2021)

    first version on laravel-rajaongkir

    What's Changed

    • refactor: simplify RajaOngkir API Call by @axmad386 in https://github.com/kodepintar/laravel-rajaongkir/pull/1
    • docs: change readme by @sangvictim in https://github.com/kodepintar/laravel-rajaongkir/pull/2
    • docs: add README-ID.md by @kinkusuma in https://github.com/kodepintar/laravel-rajaongkir/pull/4
    • fix: update readme and fix load config by @sangvictim in https://github.com/kodepintar/laravel-rajaongkir/pull/5

    New Contributors

    • @axmad386 made their first contribution in https://github.com/kodepintar/laravel-rajaongkir/pull/1
    • @sangvictim made their first contribution in https://github.com/kodepintar/laravel-rajaongkir/pull/2
    • @kinkusuma made their first contribution in https://github.com/kodepintar/laravel-rajaongkir/pull/4

    Full Changelog: https://github.com/kodepintar/laravel-rajaongkir/commits/1.1

    Source code(tar.gz)
    Source code(zip)
Owner
Kode Pintar
Kode Pintar
A Laravel package to help integrate Shopware PHP SDK much more easier

Shopware 6 Laravel SDK A Laravel package to help integrate Shopware PHP SDK much more easier Installation Install with Composer composer require sas/s

Shape & Shift 16 Nov 3, 2022
Laravel Package for 1APP. Learn how to integrate our APIs to build a web or mobile integration to send and accept payments for your application and businesses.

1APP Laravel Library Learn how to integrate our APIs to build a web or mobile integration to accept payments, make payment of Bills and as well custom

O'Bounce Technologies 4 Jul 25, 2022
This package is a simple API laravel wrapper for Pokemontcg with a sleek Model design for API routes and authentication.

This package is a simple API laravel wrapper for Pokemontcg with a sleek Model design for API routes and authentication.

Daniel Henze 3 Aug 29, 2022
DigitalOcean API v2 client for Symfony and API Platform

DigitalOcean Bundle for Symfony and API Platform DunglasDigitalOceanBundle allows using the DigitalOcean API from your Symfony and API Platform projec

Kévin Dunglas 25 Jul 27, 2022
API SDK for OpenTrade Commerce API: Taobao, Alibaba, JD, 1688, Aliexpress, Ebay.

OtapiPhpClient Create Client $client = new OtClient($key, $secret, $lang); key (Access Key) secret (Secret for access key) language (2 symbol lang id

OpenTrade Commerce 5 Sep 20, 2022
Fanmade project using Twitter API and Marvel API.

Project Marvel Memories A fanmade project in PHP using API Twitter V2, Marvel API and Github action scheduler. What about? Posts a random cover with d

Julien SCHMITT 15 Dec 17, 2022
Nexmo REST API client for PHP. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.

Client Library for PHP Support Notice This library and it's associated packages, nexmo/client and nexmo/client-core have transitioned into a "Maintena

Nexmo 75 Sep 23, 2022
API client for ThePay - payment gate API

This is the official highly compatible public package of The Pay SDK which interacts with The Pay's REST API. To get started see examples below.

ThePay.cz s.r.o. 3 Oct 27, 2022
Code Quiz MonoRepo (API, API Client, App)

Code Quiz Welcome to the Code Quiz Open Source project from How To Code Well. This is an Open Source project that includes an API and an App for the d

How To Code Well 2 Nov 20, 2022
OpenAI API Client is a component-oriented, extensible client library for the OpenAI API. It's designed to be faster and more memory efficient than traditional PHP libraries.

OpenAI API Client in PHP (community-maintained) This library is a component-oriented, extensible client library for the OpenAI API. It's designed to b

Mounir R'Quiba 6 Jun 14, 2023