rajibbinalam/country-state-city 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rajibbinalam/country-state-city

最新稳定版本:v0.2.0

Composer 安装命令:

composer require rajibbinalam/country-state-city

包简介

find country state and cities all over the world

README 文档

README

Latest Version on Packagist Total Downloads

This Package is provid you world info about the country state and city name with their some local information

Installation

You can install the package via composer:

composer require rajibbinalam/country-state-city

Publish Vendor Files: Find the below files

  • config > CountryStateCity.php
  • database > migrations > country , state, city and timezone
  • database > seeders > country , state, city and timezone
php artisan vendor:publish 
# Provider: rajib\LaravelCountryStateCity\CountryStateCityServiceProvider

Configuration The Migrations Table Name and Field

return [
    
	/*
	|--------------------------------------------------------------------
	| Configaration Your Migrations.
    |----------------------------------------------------------------
    | Set the table_name or use default LIKE: 'table_name' => 'countries',
    |----------------------------------------------------------------
    | 'required' => true, will be added to the migration as a field
	|---------------------------------------------------------------------
	*/
	'migrations' => [
		'countries' => [
			'table_name' => 'countries',
			'optional_fields' => [
				'phone_code' => [
					'required' => true,
					'length' => 5,
				],
				'iso3' => [
					'required' => false,
					'length' => 3,
				],
			],
		],
	],
];

Migrate

php artisan migrate

Database Seed

Register the Seeders file to your DatabaseSeeder.php and run the seed commands

$this->call([
    CountryTableSeeder::class,
    StateTableSeeder::class,
    CityTableSeeder::class,
    TimezoneTableSeeder::class,
]);
php artisan db:seed    # it's need some time to seed the database

Contributing

We will accept your Contribution with respect. Please see CONTRIBUTING for details.

Credits

License

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

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-07