Download the PHP package zhiephie/lushi without Composer

On this page you can find all versions of the php package zhiephie/lushi. 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 lushi

Laravel Lushi 📜

CI status

Lushi is a library of static Eloquent models for fixture data Administrative Subdivisions of Indonesia, such as provincies, regencies, districts and villages.

Contents

Installing Lushi

You can use Composer to install Lushi into your application.

No additional setup is required.

Using a model

You can interact with a Lushi model just like you would any other Eloquent model, except that it only handles read-only operations.

Available models

Lushi\Models\Province

Column Name Description Example
id ID province. 11
name Province name. Jawa Timur
Relationship name Model
regencies Lushi\Models\Regency

Lushi\Models\Regency

Column Name Description Example
id ID regency. 1101
province_id ID province. 11
name Regency name. KOTA SABANG
Relationship name Model
districts Lushi\Models\District

Lushi\Models\District

Column Name Description Example
id ID District. 1101010
regency_id ID regency. 1101
name District name. TEUPAH SELATAN
Relationship name Model
villages Lushi\Models\Village

Model relationships

Implementing an Eloquent relationship between a model in your app and a Lushi model is very simple. There are a couple of approaches you could take.

Using inheritance

The simplest option is to create a new model in your app, and let it extend the Lushi model. Your new app model will now behave like the original Lushi model, except you can register new methods and customise it to your liking:

See our section on model customisation for more customisation possibilities that are made available if you utilise this method.

Column customisation

Lushi allows you to customise the column names on any provided model.

Create a new model within your app and let it extend the Lushi model that you would like to customise:

In this example, the App\Models\Province, extending the Lushi\Models\Province model, has the province_code column remapped to id:

Contributing

If you have fixture data to contribute to the library, please open a pull request!

For reference, check out the existing models.


All versions of lushi with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
calebporzio/sushi Version ^2.1
illuminate/database Version ^7.0 || ^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 zhiephie/lushi contains the following files

Loading the files please wait ....