phpvms/app/Support/Countries.php

25 lines
478 B
PHP

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