Download the PHP package cuongnd88/jutility without Composer

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

Laravel Japanese Utility

This package provides a convenient way to retrieve Japanese Utility such as Japanese Postal Code, Japanese Localization, CSV

Installation

1-Install cuongnd88/jutility using Composer.

2-You can modify the configuration by copying it to your local config directory:

You select the utility by adding --tag option:

There are 3 options:

--tag=public is to publish the JPostal Utility via javascript.

--tag=config is to publish the JPostal Utility via php/laravel.

--tag=lang is to publish the Japanese Localization Utility.

Sample Usage

JPostal Utility via Javascript

With the JPostal utility, you can achieve Japanese postal data by postal code. You just need implementing like below

resources/views/user/jpostal.blade.php

JPostal.capture(zip, response):

zip : is a string value that you can assign a value contains id or class sign in identifing zip code. For example: .zip or #zip.

response is a array or function that you get the data (prefecture, city, area and street). If the array only has one item, it resturns data with comma sign. The array has 4 elements, so it returns seperated data corresponding to prefecture, city, area and street. If the resposne is a function, it will callback .

MEMO you can use id and class signs for zip and response parameters. You can enter both postal code formats (NNN-NNNN or NNNNNNN).

The JPostal provides functions to select a city correspond to a prefecture

JPostal.innerPrefecturesHtml(callback) .

JPostal.nnerCityHtmlByPref(prefTag, callback) .

JPostal Utility via PHP/Laravel

There are several functions to assist you get Japanese postal code:

_jpostal_pref($code = null): Get Japanese prefectures by code ._

_jpostal_pref_city($prefCode, $city = null): Get Japanese city by prefecture code ._

_jpostal_code($code): Get Japanese postal data by code ._

jlang($key): Use translation strings as keys are stored as JSON files in the resources/lang/{$currentLocale}/ directory .

Japanese Localization Utility

The cuongnd88/jutility package provides a convenient way to retrieve strings in Japanese languages. The default language for your application is stored in the config/app.php configuration file. You may modify this value to suit the needs of your application.

Language strings are stored in files within the resources/lang directory.

CSV

The CSV utility support to read, validate and get the CSV file. You have to set the valitor in config/csv.php. Please refer to the defaut:

The CSV is a facade that provides access to an object from the container. You just need to import the CSV facade near the top of the file.

read($file, array $standardHeader = [], $validatorConfig = null): read CSV file, return CSV object .

filter(): filter CSV data, return an array ['validated' => [...], 'error' => [...]].

get(): get CSV data (including validated and error data) except CSV header line, return an array.

validatorErrors(): get validated errors, return an array .

MEMO: the CSV returns an array data (or error list), the index array is line number of CSV file.

save(string $fileName, array $data, $header = null): export data to CSV file .

Demo

This is demo soure code.

JPostal Utility

CSV Utility


All versions of jutility with dependencies

PHP Build Version
Package Version
No informations.
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 cuongnd88/jutility contains the following files

Loading the files please wait ....