@extends('layout')
@section('judul')
Daftar Client
@endsection

@section('konten')
<a href="{{url('/client/create')}}" class="btn btn-success"><i class = "glyphicon glyphicon-plus"></i>Tambah</a>
<table class="table table-striped">
	<thead>
		<tr>
			<th>Image</th>
			<th>Fullnames</th>
			<th>Sex</th>
			<th>Birthdate</th>
			<th>Idcard</th>
			<th>Province</th>
			<th>District</th>
			<th>Sector</th>
			<th>Edit</th>
			<th>Delete</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			@foreach($data as $a)
				<tr>
					<td><img src="\Pictures\{{$a->image}}" style="width:100px;height:100px;"></td>
					<td>{{$a->fullnames}}</td>
					<td>{{$a->sex}}</td>
					<td>{{$a->birthdate}}</td>
					<td>{{$a->idcard}}</td>
					<td>{{$a->province}}</td>
					<td>{{$a->district}}</td>
					<td>{{$a->sector}}</td>
					<td>
					<form action="{{ url('client/'.$a->id) }}" method="post">
					<a href="{{ url('client/'.$a->id.'/edit') }}" class ="btn btn-primary" ><i class = "glyphicon glyphicon-edit"></i></a>
					</form>
					</td>
					<td>
					<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></form>
					</td>
					</tr>
			@endforeach
		</tr>
	</tbody>
	
</table>
@endsection