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

@section('konten')
<form action="{{url('client/'.$data->id )}}" method ="post">
<input type="hidden" name="_method" value="PATCH">
{{ csrf_field() }}
<label>Image</label>
<div class="form-group{{ ($errors->has('image')) ? $errors->first('image') : '' }}">
          <input type="file" name="image">
{!! $errors->first('image','<p class="help-block">:message</p>') !!}
 </div>

<label>Fullnames</label>
<div class="form-group{{ ($errors->has('fullnames')) ? $errors->first('fullnames') : '' }}">
<input type="text" name="fullnames" value="{{$data->fullnames}}" class="form-control">
 {!! $errors->first('fullnames','<p class="help-block">:message</p>') !!}
 </div>

<label>Sex</label><br>
          <input type="radio" name="sex" value="male" checked> Male<br>
          <input type="radio" name="sex" value="female"> Female<br>
          {!! $errors->first('sex','<p class="help-block">:message</p>') !!}

<label>Birthdate</label>
<div class="form-group{{ ($errors->has('birthdate')) ? $errors->first('fullnames') : '' }}">
<input type="date" name="birthdate" value="{{$data->birthdate}}" class="form-control">
{!! $errors->first('birthdate','<p class="help-block">:message</p>') !!}
</div>

<label>Idcard</label>
 <div class="form-group{{ ($errors->has('idcard')) ? $errors->first('birthdate') : '' }}">
<input type="text" name="idcard" value="{{$data->idcard}}" class="form-control">
{!! $errors->first('idcard','<p class="help-block">:message</p>') !!}
</div>

<label>Province</label>
<div class="form-group{{ ($errors->has('province')) ? $errors->first('idcard') : '' }}">
<input type="text" name="province" value="{{$data->province}}" class="form-control">
{!! $errors->first('province','<p class="help-block">:message</p>') !!}
</div>

<label>District</label>
<div class="form-group{{ ($errors->has('district')) ? $errors->first('province') : '' }}">
	<input type="text" name="district" value="{{$data->district}}" class="form-control">
{!! $errors->first('district','<p class="help-block">:message</p>') !!}
</div>

<label>Sector</label>
<div class="form-group{{ ($errors->has('sector')) ? $errors->first('district') : '' }}">
	<input type="text" name="sector" value="{{$data->sector}}" class="form-control">
	{!! $errors->first('sector','<p class="help-block">:message</p>') !!}
</div>

<input type="submit" class="btn btn-success" value="Simpan">
</form>
@endsection