public function show($id) { if (Input::has('key') == false) { return $this->response->errorUnauthorized(); } try { $ad = Ad::where('message_number', $id)->first(); return $this->response->withItem($ad, new AdTransformer()); } catch (\Exception $e) { return $e->getMessage(); } }
public function hashtagTotal() { $count = Hashtag::count(); return $this->response->withItem($count, new CountTransformer()); }
/** * @param $userId * @return mixed */ public function show($userId) { $this->authorize('current', $this->userRepository->findByUuid($userId)); return $this->response->withItem($this->userRepository->findByUuid($userId), new UserTransformer()); }