@extends('layouts.dashboard') @section('content') .row .col-md-4 .box .box-header.dark %h2 %a{"data-toggle"=>"collapse", "href"=>"#xxx", "aria-expanded"=>"false"} Agregar Categorias #xxx.box-body.collapse {!! Form::open(['route'=> 'category.store','method'=>'POST', 'enctype'=>'multipart/form-data']) !!} @include('dashboard.categories.fields') .form-group .col-md-12 %button.btn.btn-primary{:type => "submit"} Registrar {!! Form::close() !!} .col-md-8 .box .box-header.dark %h2 Listado de Categorias .box-body %table.table %tr %th # %th Nombre %th Resumen %th Productos %th @foreach ($categories as $category) %tr %td = $category->id %td %p = $category->description %p Slug: %b = $category->slug != null ? $category->slug : 'N/A' %img{:src=>"{{asset('storage/'.$category->portada)}}", :width=>"150px;"} %td = $category->summary %td = $category->products()->count() %td {!! Form::open(['route'=> ['category.destroy',$category->id],'method'=>'DELETE'])!!} %button.btn.btn-danger.btn-xs{:onclick => "return confirm('¿Estas seguro de eliminar este elemento?');", :type => "submit"} %i.fa.fa-trash {!! Form::close()!!} %a.btn.btn-xs.accent{:href=>"{{route('category.edit', $category->id)}}"} Editar @endforeach .dker.p-a.text-right {{ $categories->links() }} @endsection