Turn closure into static
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Support;
|
namespace App\Support;
|
||||||
|
|
||||||
|
use League\ISO3166\ISO3166;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Countries
|
* Class Countries
|
||||||
*/
|
*/
|
||||||
@@ -14,8 +16,8 @@ class Countries
|
|||||||
*/
|
*/
|
||||||
public static function getSelectList()
|
public static function getSelectList()
|
||||||
{
|
{
|
||||||
$countries = collect((new \League\ISO3166\ISO3166())->all())
|
$countries = collect((new ISO3166())->all())
|
||||||
->mapWithKeys(function ($item, $key) {
|
->mapWithKeys(static function ($item, $key) {
|
||||||
return [strtolower($item['alpha2']) => $item['name']];
|
return [strtolower($item['alpha2']) => $item['name']];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user