successful()){ $channelId = $response['data']['uid']; $term = DhammaTerm::where('channal',$channelId) ->where('tag',':abbr:') ->where('word',$word) ->first(); if($term){ return $this->ok($term); }else{ return $this->error('no term'); } }else{ return $this->error('no channel'); } } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\DhammaTerm $dhammaTerm * @return \Illuminate\Http\Response */ public function update(Request $request, DhammaTerm $dhammaTerm) { // } /** * Remove the specified resource from storage. * * @param \App\Models\DhammaTerm $dhammaTerm * @return \Illuminate\Http\Response */ public function destroy(DhammaTerm $dhammaTerm) { // } }