get('id'); $type = Request()->get('type'); $msg='合同不存在'; if(empty($type) || empty($id)){ $msg='参数错误'; } if ($id && $type) { $find = Contract::where('id', $id)->find(); if ($find && $find['url']) { $url = json_decode($find['url'], true); if(isset($url[$type])){ return redirect($url[$type]); } } } return '

:)

'.$msg.'

'; } }