/** * Remove the specified Tag from storage. * * @param int $tag_id * @return \Illuminate\Http\Response */ public function destroy($tag_id) { $tag = Tag::find($tag_id); try { if ($tag != null) { Knock::deleteTag($tag_id); return redirect('/knock/tags')->with('flash_message', 'Tag ' . $tag->name . ' has been deleted'); } } catch (KnockCascadeDeleteAttemptException $e) { return redirect('/knock/tags/' . $tag_id)->with('flash_message', $e->getMessage()); } }