/**
  * Remove the specified Category from storage.
  *
  * @param  int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     $category = $this->conceptocategoryRepository->find($id);
     if (empty($category)) {
         Flash::error('Category not found');
         return redirect(route('conceptos.categorias.index'));
     }
     $this->conceptocategoryRepository->delete($id);
     Flash::success('Category deleted successfully.');
     return redirect(route('conceptos.categorias.index'));
 }
Ejemplo n.º 2
0
 public function destroy($id)
 {
     $this->repository->delete($id);
     return redirect()->route('admin.clients.index');
 }
Ejemplo n.º 3
0
<?php

include_once ROOT_PATH . "system/models/category.class.php";
include_once ROOT_PATH . "system/repository/category_repository.class.php";
$category_repository = new CategoryRepository();
if (isset($_GET['id']) && isset($_GET['action']) && $_GET['action'] == 'delete') {
    $category_repository->delete($_GET['id']);
    header("location:index.php");
}
?>


<?php 
if (isset($_GET['success']) && $_GET['success'] == "true") {
    ?>
<div class="alert alert-success alert-dismissible fade in" role="alert">
      <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
      <strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
</div>
<?php 
}
?>

<div class="pull-right">
	<a href="index.php?page=aenquiry&m=add" class="btn btn-primary">Add Enquiry</a>
</div>



<div class="row">
<table class="table table-stripped table-hover">