phpvms/app/Support/Countries.php
Nabeel S 11bbcd1df7
User country mapping; ignore unused groups #443 (#584)
* Fix the user country import #443

* Ignore the old "core" groups because they're unused #443

* Properly sync roles and individual permissions #443
2020-02-24 15:12:36 -05:00

25 lines
473 B
PHP

<?php
namespace App\Support;
use League\ISO3166\ISO3166;
/**
* Class Countries
*/
class Countries
{
/**
* Get a select box list of all the countries
*
* @return \Illuminate\Support\Collection
*/
public static function getSelectList()
{
return collect((new ISO3166())->all())
->mapWithKeys(static function ($item, $key) {
return [strtolower($item['alpha2']) => $item['name']];
});
}
}