'; print_r($res); die; $time_zone = json_decode(file_get_contents(base_path('/timezones.json')), true); foreach ($time_zone as $index => $item) { $res = TimeZone::create([ 'name' => $item['value'], 'abbr' => $item['abbr'], 'text' => $item['text'], 'offset' => $item['offset'], 'utc' => json_encode($item['utc'], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES), ]); if ($res) { var_dump($index . '-成功'); } else { var_dump($index . '-失败'); } } print '
';
print_r('success');
die;
$token_data = [
'id' => 7
];
$token = JwtToken::generateToken($token_data);
print '';
print_r($token);
die;
// throw new \Exception('显示是错误测试');
} catch (\Exception $e) {
return $this->json([
'code' => ResponseCode::FAIL,
'msg' => $e->getMessage()
]);
}
// return $this->json([
// 'code' => ResponseCode::SUCCESS,
// 'data'=>[1,2,3],
// 'msg' => '变更成功',
// ]);
}
public function upload(Request $request)
{
$service = new UploadService();
$res = $service->uploadImg($request);
return $this->json($res);
}
}