@extends('layout')
@section('judul')
Daftar Client
@endsection
@section('konten')
<table class="table table-hover">
	<thead>
		<tr>
			<th>Id</th>
			<th>Image</th>
			<th>Nama</th>
			<th>Jenis Kelamin</th>
			<th>Tanggal lahir</th>
			<th>Provinsi</th>
			<th>Distrik</th>
			<th>Sektor</th>
			<th>Action</th>
		</tr>
	</thead>
	<tbody>
		<tr>	
			@foreach($data as $a)
			<tr>
				<td>{{$a->id}}</td>
				<td><img src="image/<?php echo $a->image; ?>" style="width:50px;heigh:50px;"></td> 

				<td>{{$a->nama}}</td>
			
				<td>{{$a->jeniskelamin}}</td>
			
				<td>{{$a->tanggallahir}}</td>
			
				<td>{{$a->provinsi}}</td>
			
				<td>{{$a->distrik}}</td>
			
				<td>{{$a->sektor}}</td>

				<td>
				<a href="{{ url('client/'.$a->id.'/edit') }}" class="btn btn-primary"><i class="glyphicon glyphicon-edit"></i></a>

				<form action="{{ url('client/'.$a->id) }}" method="post">
				{{ csrf_field() }}
				<input type="hidden" name="_method" value="DELETE">

				<button type="submit" class="btn btn-danger"><i class="glyphicon glyphicon-trash"></i></button>
				</form>
				</td>
			</tr>
			@endforeach
		</tr>
	</tbody>
</table>
@endsection

