@extends('admins.admin_home')

@section('content')
<div class="container">
    <div class="row">
        <div class="col-md-12 col-md-offset-0">
            <div class="panel panel-default">
            <div class="panel-heading">Edit Karyawan</div>
				<div class="panel-body">
					@if(!empty($errors->first()))
                        <div class='alert alert-warning'>{!! $errors->first() !!}</div>
					@endif
						<form action="{{route('karyawan.update', $karyawans->id)}}" method="post">
							<input name="_method" type="hidden" value="PATCH">
							{{csrf_field()}}
							<div class="form-group{{ $errors->has('nama') ? ' has-error' : '' }}">
								<input type="text" name="nama" class="form-control" placeholder="Nama" value="{{$karyawans->nama}}">
								{!! $errors->first('nama', '<p class="help-block">:message</p>') !!}
							</div>
							<div class="form-group{{ $errors->has('pekerjaan') ? ' has-error' : '' }}">
								<input type="text" name="pekerjaan" class="form-control" placeholder="Pekerjaan" value="{{$karyawans->pekerjaan}}">
								{!! $errors->first('pekerjaan', '<p class="help-block">:message</p>') !!}
							</div>
							<div class="form-group{{ $errors->has('notlp') ? ' has-error' : '' }}">
								<input type="text" name="notlp" class="form-control" placeholder="Nomor Handphone" value="{{$karyawans->notlp}}">
								{!! $errors->first('notlp', '<p class="help-block">:message</p>') !!}
							</div>
							<div class="form-group">
								<input type="submit" class="btn btn-primary" value="Simpan">
							</div>
						</form>
				</div>
			</div>
		</div>
	</div>
</div>
@endsection