国名は日本語へ

このコミットが含まれているのは:
テクニカル諏訪子 2020-03-01 22:12:50 +09:00
コミット a6a8316441
2個のファイルの変更5行の追加5行の削除

ファイルの表示

@ -80,16 +80,16 @@ class UserController extends Controller {
return $get;
}
public function getCountries() {
$flags = File::files('assets/flags');
public function getCountries () {
$flags = DB::table('nhn_country')->orderBy('id', 'asc')->get();
$res = array();
foreach ($flags as $flag) {
$protocol = isset($_SERVER["HTTPS"]) ? 'https' : 'http';
$res[] = array(
'value' => $flag->getBasename('.png'),
'label' => '<img src="'.$protocol.'://'.$_SERVER['SERVER_NAME'].'/'.$flag->getPathname().'" /> '.$flag->getBasename('.png')
'value' => $flag->nameEng,
'label' => $flag->name
);
}

ファイルの表示

@ -28,7 +28,7 @@
<div class="col">
<select name="country" id="country-register" class="custom-select">
@foreach ($res as $r)
<option value="{{$r['value']}}">{{$r['value']}}</option>
<option value="{{$r['value']}}">{{$r['label']}}</option>
@endforeach
</select>
</div>