public function findans() { // $ans = Request::get('radio'); $id = Request::get('id'); //echo $ans.'</br>'.$id; die; $finalans = Words::select('id')->where('definition', 'like', Request::get('radio'))->get()->toArray(); //print_r($finalans);die; if ($finalans == null) { $result = false; } else { if ($finalans[0]['id'] == $id) { $result = true; } else { $result = false; } // echo $result; } return View::make('words/result', ['result' => $result]); }
public function fetch() { return WordsModel::fromType(2); }
public static function getWordList($end) { $word = Words::all()->where('word', 'like', '%' . $end); return $word; }
public function add() { $word = WordsModel::create(\Request::all()); return json_encode(['success' => 'success', 'data' => $word]); }