/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $comment = VisitorComments::find($id); if (!is_null($comment)) { if ($comment->delete()) { return Redirect::route('admin.comments.edit', array($comment->school_id))->withErrors(array('mainSuccess' => 'Коментарът е изтрит.')); } else { return Redirect::route('admin.comments.edit', array($comment->school_id))->withErrors(array('mainError' => 'Грешка с базата данни.')); } } else { return Redirect::route('admin.comments.edit', array($comment->school_id))->withErrors(array('mainError' => 'Училището не е намерено.')); } }