承接 aheenam/countries 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

aheenam/countries

Composer 安装命令:

composer require aheenam/countries

包简介

A simple Laravel package to handle country lists

README 文档

README

This package is a Laravel Wrapper for the country-list package by Saša Stamenković. It was created as a fallback to antonioribeiro/countries which has PHP 7 and Laravel 5.3 as it minimum requirements.

Note: that this package does NOT contain the whole functionality as antonioribeiro/countries but only provides the name of the countries

Installation

You can install the package via composer:

$ composer require aheenam/laravel-translatable

Then add the service provider must be registered:

// config/app.php
'providers' => [
    // ...
    Aheenam\Countries\CountriesServiceProvider::class,
];

Also add Countries to your aliases list

// config/app.php
'aliases' => [
    // ...
    'Countries' => \Aheenam\Countries\Facades\Countries::class,
];

Usage

There are not that much methods for now. If you are interested in more, feel free to add them and send us a PR.

Get All Countries

<?php

Countries::all();

returns a list of all countries in all languages currently loaded. By default the current language set in App::setLocale() is populated.

If you want to get the countries in another language, use

<?php
App::setLocale('en'):
$countries = Countries::allIn();
$countries->get('en'); // returns a collection with all countries in English

Get A specific country

To get a specific country call the get() method with the language key, you are looking for

<?php
App::setLocale('en'):
Countries::get('de'); // returns "Germany"

If you want to get the language in a specific language, just add the language code as the second parameter.

<?php
App::setLocale('en'):
Countries::get('de', 'de'); // returns "Deutschland"

Changelog

Check CHANGELOG for the changelog

Testing

To run tests use

$ composer test

or

$ composer test:windows

on windows machines.

Contributing

soon

Security

If you discover any security related issues, please email rathes@aheenam.com or use the issue tracker of GitHub.

About Aheenam

Aheenam is a small company from NRW, Germany creating custom digital solutions. Visit our website to find out more about us.

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-08-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固