for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanedev\Localization\Entities;
use Illuminate\Support\Collection;
/**
* Class SupportedLocaleCollection
*
* @package Arcanedev\Localization\Entities
* @author ARCANEDEV <[email protected]>
*/
class SupportedLocaleCollection extends Collection
{
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
* Transform the collection with only locale's native name.
* @return \Illuminate\Support\Collection
public function toNative()
return $this->map(function (Locale $locale) {
return $locale->native();
})->toBase();
}