定制 fmendoza/mxdb 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

fmendoza/mxdb

Composer 安装命令:

composer require fmendoza/mxdb

包简介

Mxdb is a package for Laravel 4, providing the states and cities of Mexico.

README 文档

README

Mxdb is a package for Laravel 4, providing the states and cities of Mexico.

Installation

Add fmendoza/mxdb to composer.json.

"fmendoza/mxdb": "dev-master"

Run composer update to pull down the latest version.

Edit app/config/app.php and add the provider

'providers' => array(
    'Fmendoza\Mxdb\MxdbServiceProvider',
)

Now add the alias.

'aliases' => array(
    'State' => 'Fmendoza\Mxdb\StateFacade',
    'City' => 'Fmendoza\Mxdb\CityFacade',
)

Model

This is an optional step, it contains the tables name and does not need to be altered. If the default name states and cities suits you, leave it. Otherwise run the following command

$ php artisan config:publish fmendoza/mxdb

Next generate the migration file:

$ php artisan mxdb:migration

It will generate the <timestamp>_setup_states_table.php and <timestamp>_setup_cities_table.php migrations and the MexicoSeeder.php seeder. To make sure the data is seeded insert the following code in the seeds/DatabaseSeeder.php

$this->call('MexicoSeeder');
$this->command->info('Seeded the states and cities!'); 

You may now run it with the artisan migrate command:

$ php artisan migrate --seed

After running this command the filled states and cities tables will be available

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-02-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固