Beispiel #1
0
 public function allWords()
 {
     $group = Input::get('group_id');
     if ($group == null) {
         return Word::all();
     } else {
         if (is_array($group)) {
             $groups = JsonController::array_to_sql_list($group);
             return Word::whereRaw("group_id in {$groups}")->get();
         }
         return Word::where('group_id', '=', $group)->get();
     }
 }