order(['priority' => 'desc', 'id' => 'desc']) ->select(); $previous = PreviousModel::where('status', ReservedModel::STATUS_SHOW) ->order(['priority' => 'desc', 'id' => 'desc']) ->limit(3) ->select(); return view('', [ 'reserved' => $reserved, 'previous' => $previous, ]); } public function t1() { return ''; $str = ''; $arr = json_decode($str, true); $no = 292; $rid = 3; $rsid = 9; foreach ($arr as $v) { OfficerReviewTitleModel::create([ 'rid' => $rid, 'rsid' => $rsid, 'no' => $no, 'title' => $v['title'], 'option' => json_encode($v['options'], JSON_UNESCAPED_UNICODE), ]); $no++; } return '完成'; } }