Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
z-song committed Dec 11, 2019
1 parent 265df1a commit ea473a0
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/Http/Controllers/IdValidatorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Encore\Admin\Widgets\Table;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Illuminate\Support\Arr;
use Jxlwqq\IdValidator\IdValidator;

class IdValidatorController extends Controller
Expand Down Expand Up @@ -45,15 +46,15 @@ protected function renderResultTable($id)
$info = $idValidator->getInfo($id);

$data = [
'地址码' => array_get($info, 'addressCode'),
'地址码是否废弃' => array_get($info, 'abandoned'),
'地址' => array_get($info, 'address'),
'出生日期' => array_get($info, 'birthdayCode'),
'星座' => array_get($info, 'constellation'),
'生肖' => array_get($info, 'chineseZodiac'),
'性别' => array_get($info, 'sex') == 1 ? '' : '',
'号码长度' => array_get($info, 'length'),
'校验码' => array_get($info, 'checkBit'),
'地址码' => Arr::get($info, 'addressCode'),
'地址码是否废弃' => Arr::get($info, 'abandoned'),
'地址' => Arr::get($info, 'address'),
'出生日期' => Arr::get($info, 'birthdayCode'),
'星座' => Arr::get($info, 'constellation'),
'生肖' => Arr::get($info, 'chineseZodiac'),
'性别' => Arr::get($info, 'sex') == 1 ? '' : '',
'号码长度' => Arr::get($info, 'length'),
'校验码' => Arr::get($info, 'checkBit'),
];

return new Box('查询结果', new Table(['信息'], $data));
Expand Down

0 comments on commit ea473a0

Please sign in to comment.