ernysans/laraworld 问题修复 & 功能扩展

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

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

ernysans/laraworld

Composer 安装命令:

composer require ernysans/laraworld

包简介

Countries, Languages and Time Zones Package for Laravel 5.*

README 文档

README

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

Laraworld

Countries, Languages and Time Zones Package for Laravel and Lumen 5.*

Please check the Known Issues section before reporting a new one.

ScreenShot

Installation

This package can be installed through Composer.

$ composer require ernysans/laraworld

When using Laravel there is a service provider that you can make use of.

// app/config/app.php

'providers' => [
    '...',
    ErnySans\Laraworld\LaraworldServiceProvider::class,
];

Configure the aliases to make use of the Facades.

// app/config/app.php

'aliases' => [
    '...',
    'Countries' => ErnySans\Laraworld\Facades\Countries::class,
    'TimeZones' => ErnySans\Laraworld\Facades\TimeZones::class,
    'Languages' => ErnySans\Laraworld\Facades\Languages::class,
];

If you are using Laravel 5.5 it's not required to manually add the service provider and aliases.

Publish Migrations and Seeds.

$ php artisan vendor:publish --provider="ErnySans\Laraworld\LaraworldServiceProvider"

Prepare Seeds.

// database/seeds/DatabaseSeeder.php

class DatabaseSeeder extends Seeder
{

    public function run()
    {
        // Seed the countries
        $this->call(CountriesTableSeeder::class);
    
        // Seed the Time Zones
        $this->call(TimeZonesTableSeeder::class);
    
        // Seed the Languages
        $this->call(LanguagesTableSeeder::class);
    }
}

Run Migrations and Seed the tables

$ php artisan migrate
$ php artisan db:seed

Use

These methods are provided:

Collection Methods

When using Laravel you can work with the Collection Available Methods.

JSON file (Optional)

Use this methods If you want to get all the data from the JSON file:

  • Countries::allJSON(): Get all the countries from the JSON file.
  • Languages::allJSON(): Get all the languages from the JSON file.
  • TimeZones::allJSON(): Get all the time zones from the JSON file.

Contributing

Thank you for considering contributing to the Laraworld package!. Remember to run PHPUnit tests before sending a new pull request.

License

This package is open-sourced licensed under the MIT license.

统计信息

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

GitHub 信息

  • Stars: 17
  • Watchers: 3
  • Forks: 12
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固