page($page , $limit)->order('addtime desc')->select(); } public function count($where) { return QuestionCompany::where($where)->count(); } //创建考卷 public function create_question($title) { $QuestionId = QuestionBank::column('id'); dump(array_rand($QuestionId , 2));exit; $data = [ 'title' => $title, 'cmid' =>2, 'question_id' => '', 'score' => 100, ]; return QuestionCompany::insert($data); } public function del($id) { return QuestionCompany::where('id',$id)->setField('del',1); } }