/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function getIndex()
 {
     // Grab all the blog category
     $blogscategories = BlogCategory::all();
     // Show the page
     return View('admin.blogcategory.index', compact('blogscategories'));
 }
Exemplo n.º 2
0
 public function index()
 {
     if (Request::isMethod('get')) {
         $cats = BlogCategory::all();
         return view('admin.blogcategories.index', array('cats' => $cats));
     }
     /// DELETE CATEGORY
     if (Request::isMethod('delete')) {
         $data = Request::input('data');
         BlogCategory::destroy($data);
         return;
     }
 }