Download the PHP package davidarl/api-daerah-indonesia without Composer

On this page you can find all versions of the php package davidarl/api-daerah-indonesia. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package api-daerah-indonesia

API Daerah Indonesia - Laravel

Ini adalah package laravel yang lengkap untuk mambantu mambuat layanan RestAPI nama daerah di Indonesia. Meskipun sebenarnya mudah membuat layanan api yang menyediakan nama daerah seperti ini tapi itu cukup ribet dan males, maka ini cocok untuk anda yang MALAS :)

Sudah dilengkapi migration dan seeder, plus Client API nya untuk mempermudah penggunaan api di case input select

Suport Laravel 8. - latest PHP 7.1/8.

Instalasi

install package dengan composer

Jalankan migrasi untuk membuat table provinsi, kabupaten, kecamatan

Membuat data provinsi, kabupaten, kecamatan

API Endpoint

Implementasi

Database seeder

kamu bisa memanggil class DaerahSeeder di DatabaseSeeder

Models

Misal kamu ingin custom model pada Model Provinsi

Api Client

Ini bisa digunakan untuk request ke api nya atau membuat input select berfungsi

publish dulu script nya jika ingin menggunakan secara local

akan muncul 2 script api-daerah.js dan api-daerah.min.js pada directory /public/api-daerah/js.

Usage / Cara Penggunaan

jangan lupa panggil script nya dulu.

Basic Usage

Jika kamu menggunakan API bawaan, ini tidak ada konfigurasi apapun untuk menampilkan data. cukup sediakan element select dengan id default lalu panggil class ApiDaerah() maka akan langsung berfungsi

kamu bisa custom id nya

set value saat pertama render (on load):

Masih ada lagi configurasinya? ada dong ini config lengkap nya dengan default value-nya juga.

Note: dataID ini digunakan untuk mengisi parameter di url endpoint jadi jika kamu mengganti value dengan nama dari provinsi misal, kamu juga harus mengatur dataID ke key id (nama key tergantung pada data source nya)

Oh iya, client ApiDaerah ini juga dapat di aplikasikan dengan RestAPI lainnya, kamu dapat konsume api orang lain dengan mudah menggunakan bantuan ApiDaerah Client ini. Contoh penggunaan ApiDaerah Client menggunakan penyedia API lain bisa dilihat di data-lokasi-indonesia

Method yang tersedia

Contoh Jika ingin membuat metode select sendiri


All versions of api-daerah-indonesia with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package davidarl/api-daerah-indonesia contains the following files

Loading the files please wait ....