@extends('layouts.Layout')

@section('content')
        <div class="col-md-12">
            <div class="card">
                <div class="header">
                    <h4>Daftar Calon Siswa</h4>
                </div>
                    <div class="content table-responsive table-full-width" id="table">
                    <table class="table table-borderless">
                        <thead>
                            <th>No Pendaftar</th>
                            <th>Nama</th>
                            <th>Jenis Kelamin</th>
                            <th>Tanggal Lahir</th>
                            <th>Status</th>
                            <th></th>
                        </thead>
                        {{csrf_field()}}
                        <tbody>
                            @foreach($Daftar as $pen)
                            <tr>
                                <td>{{$pen->no_pendaftar}}</td>
                                <td>{{$pen->nama}}</td>
                                <td>{{$pen->jeniskelamin}}</td>
                                <td>{{$pen->tanggallahir}}</td>
                                <td>{{$pen->status}}</td>
                                <td>
                                <form class="" action="{{route('Daftar.destroy',$pen->id)}}" method="post">
                                    <input type="hidden" name="_method" value="delete">
                                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                    <a href="{{ route('Daftar.edit',$pen->id)}}" class="btn btn-info pull-right btn-sm"><span class="glyphicon glyphicon-edit"></span> Update</a>
                                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                    <a href="{{ route('Daftar.show',$pen->id)}}" class="btn btn-info pull-right btn-sm"><span class="glyphicon glyphicon-list"></span> Detail</a>
                                    <input type="hidden" name="name"><a  class="btn btn btn-danger btn-sm" onclick="return confirm('are you sure to delete?')" ><span class="glyphicon glyphicon-trash"></span>  Hapus</a>
                                </form>
                                </td> 
                            </tr>
                            @endforeach
                        </tbody>
                    </table>
                </div>
             
            </div>
        </div>

@endsection
