for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanesoft\Seo\Entities;
/**
* Class Locales
*
* @package Arcanesoft\Seo\Entities
* @author ARCANEDEV <[email protected]>
*/
class Locales
{
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
* Get all the supported locales.
* @return \Illuminate\Support\Collection
public static function all()
$locales = config('arcanesoft.seo.locales', []);
return collect(array_combine($locales, $locales))->transform(function ($locale) {
return trans("seo::locales.$locale");
});
}
* Get all the supported locales keys.
public static function keys()
return static::all()->keys();
* Get a supported locale by its key.
* @param string $key
* @param string|null $default
* @return string|null
public static function get($key, $default = null)
$default
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return static::all()->get($key);
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.