/** * Update the specified resource in storage. * * @param int $id * @return Collection */ public function all() { $collection = Vocabulary::paginate(); if ($collection) { return $collection; } throw new Exception('Something went wrong!', 500); }