@extends('layouts.dashboard') @section('content') .row .col-md-4 .box .box-header.dark %h2 %a{"data-toggle"=>"collapse", "href"=>"#xxx", "aria-expanded"=>"false"} Agregar usuarios #xxx.box-body.collapse %form.form-horizontal{:action => "{{ route('user.store') }}", :method => "POST"} = csrf_field() @include('usuarios.fields') #e{:class => "form-group{{ $errors->has('password') ? 'has-error' : '' }}"} %label.col-md-12.control-label{:for => "password"} Contraseña .col-md-12 %input#password.form-control{:name => "password", :required => "", :type => "password"}/ - if ($errors->has('password')) %span.help-block %strong {{ $errors->first('password') }} .form-group %label.col-md-12.control-label{:for => "password-confirm"} Confirmar contraseña .col-md-12 %input#password-confirm.form-control{:name => "password_confirmation", :required => "", :type => "password"}/ .form-group .col-md-12 %button.btn.btn-primary{:type => "submit"} Registrar .col-md-8 .box .box-header.dark %h2 Listado de usuarios .box-body %table.table %tr %th # %th Nombre %th Correo %th Fecha de creación %th @foreach($usuarios as $usuario) %tr %td = $usuario->id %td = $usuario->name %br = $usuario->rol->description %td = $usuario->email %br = $usuario->phone %td = $usuario->created_at %td -if($usuario->id != 1) {!! Form::open(['route'=> ['user.destroy',$usuario->id],'method'=>'DELETE'])!!} %button.btn.btn-danger.btn-xs{:onclick => "return confirm(\"¿Estas seguro que deseas eliminar el USUARIO?\");", :type => "submit"} %i.fas.fa-trash-alt {!! Form::close()!!} %a.btn.info.btn-xs{:href=>"{{route('user.edit', $usuario->id)}}"} %i.fas.fa-edit @endforeach .dker.p-a.text-right {{ $usuarios->links() }} @endsection