2019-02-28 03:14:53 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Util\Localization;
|
|
|
|
|
|
|
|
use Cache;
|
|
|
|
use Illuminate\Support\Arr;
|
|
|
|
|
|
|
|
class Localization {
|
|
|
|
|
|
|
|
public static function languages()
|
|
|
|
{
|
2019-03-05 19:16:21 +00:00
|
|
|
return Cache::remember('core:localization:languages', now()->addDays(1), function() {
|
2019-02-28 03:14:53 +00:00
|
|
|
$dir = resource_path('lang');
|
|
|
|
return Arr::flatten(array_diff(scandir($dir), array('..', '.', 'vendor')));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|