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. * * @return Response */ public function update(Request $request, DhammaTerm $dhammaTerm) { // } /** * Remove the specified resource from storage. * * @return Response */ public function destroy(DhammaTerm $dhammaTerm) { // } }