@extends('layouts.dashboard') @section('content') .row .col-md-12 .box .box-header.dark %h2 Listado de comentarios %span %a.btn.btn-xs.success{:href=>"{{route('index.comments').'?approved=3'}}"} Aprobados %a.btn.btn-xs.danger{:href=>"{{route('index.comments').'?approved=2'}}"} Rechazados %a.btn.btn-xs.warning{:href=>"{{route('index.comments')}}"} Sin Moderar %a.btn.btn-xs.info{:href=>"{{route('index.comments').'?moderate=2'}}"} Moderados .box-body %table.table %tr %th # %th Publicación %th Contenido %th Estatus %th{:width=>"20%"} @foreach($comments as $c) %tr %td = $c->id %td Nombre: %b = $c->name %br Correo: %b = $c->email %br Fecha: %b = $c->created_at->format('d/m/Y') %td = $c->comment %td Moderación: %b = $c->moderate == 1 ? "Pendiente" : "Visto" %br Aprobacion: -if ($c->approved == 1) %b Pendiente -if ($c->approved == 2) %b Rechazado -if ($c->approved == 3) %b Aprobado %br %td {!! Form::model($c,['route'=> ['moderate.comments',$c->id],"method"=>"PUT"]) !!} {!! Form::select('approved', [1=>'Pendiente',2=>'Rechazado', 3=>'Aprobado'], null, ["class"=>"form-control", "required"=>"required"]) !!} %button.btn.btn-danger.btn-xs{:onclick => "return confirm('¿Estás seguro de cambiar este elemento?');", :type => "submit"} Actualizar {!! Form::close()!!} @endforeach .dker.p-a.text-right = $comments->links() @endsection