@extends('layouts.Layout')

@section('content')
 <div class="col-md-12">
  <div class="card">
      <div class="header">
         <h3>Account Calon Siswa</h3>
      </div>
        <div class="panel-body">
         <a href="{{route('akunsiswa.create')}}" class="btn btn-info pull-right btn-sm"><span class="glyphicon glyphicon-plus"></span>Tambah Data</a>
          <table class="table table-striped" id="table">
            <tr>
              <th>No</th>
              <th>Nama</th>
              <th>Email</th>
              <th>Username</th>
              <th>Action</th>
            </tr>
            @foreach($akunsiswa as $akun)
            <tr>
              <td>{{$akun->id}}</td>
              <td>{{$akun->name}}</td>
              <td>{{$akun->email}}</td>
              <td>{{$akun->username}}</td>
              <td>
                <form class="" action="{{route('akunsiswa.destroy',$akun->id)}}" method="post">
                  <input type="hidden" name="_method" value="delete">
                  <input type="hidden" name="_token" value="{{ csrf_token() }}">
                  <a href="{{ route('akunsiswa.edit',$akun->id)}}" class="btn btn-info btn-sm"><span class="glyphicon glyphicon-edit"></span>Ubah</a>
                  <button type="submit" class="btn btn-info btn-sm" onclick="return confirm('are you sure to delete?')" name="name" ><span class="glyphicon glyphicon-trash"></span>Delete</button>
                </form>
              </td> 
            </tr>
            @endforeach
          </table>
          
        </div>
      </div>
    </div>
  </div>
@endsection