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