/** * Remove the specified Vocabulary from storage. * * @param int $id * * @return Response */ public function destroy($id) { $vocabulary = $this->vocabularyRepository->find($id); if (empty($vocabulary)) { Flash::error('Vocabulary not found'); return redirect(route('vocabularies.index')); } $this->vocabularyRepository->delete($id); Flash::success('Vocabulary deleted successfully.'); return redirect(route('vocabularies.index')); }