public function admin()
 {
     $pint_count = Pinturas::count_pinturas();
     $sec_count = Secciones::count_secciones();
     $cat_count = Categorias::count_categorias();
     $art_count = Articulos::count_articulos();
     return view('admin.index', compact('art_count', 'pint_count', 'sec_count', 'cat_count'));
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $cats = Categorias::CategoriasPoemas();
     return view('articulos.create', compact('cats'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $cats = Categorias::CategoriasPinturas();
     return view('index_pinturas', compact('cats'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $cats = Categorias::CategoriasPinturas();
     $pint = Pinturas::find($id);
     return view('pinturas.edit', compact('pint', 'cats'));
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $cate = Categorias::find($id);
     $cate->delete();
     return Response()->json(["mensaje" => "`borrado"]);
 }