@if($errors->any())
@foreach($errors->all() as $error)
{!! $error !!}
@endforeach
@endif
@if(session()->has('success'))
{{ session()->get('success') }}
@endif
@if(session()->has('error'))
{{ session()->get('error') }}
@endif
{{ Form::open(array('route' => 'applyForLeave.store','enctype'=>'multipart/form-data','id'=>'leaveApplicationForm')) }}
{!! Form::hidden('employee_id',(isset($getEmployeeInfo)) ? $getEmployeeInfo->employee_id:'',$attributes = array('class'=>'employee_id')) !!}
{!! Form::text('',(isset($getEmployeeInfo)) ? $getEmployeeInfo->first_name.' '.$getEmployeeInfo->last_name: '', $attributes = array('class'=>'form-control','readonly'=>'readonly')) !!}
{{ Form::select('leave_type_id',$leaveTypeList, Input::old('leave_type_id'), array('class' => 'form-control leave_type_id select2 required')) }}
{!! Form::text('','', $attributes = array('class'=>'form-control current_balance','readonly'=>'readonly','placeholder'=>'Current balance')) !!}
{!! Form::text('application_from_date',Input::old('application_from_date'), $attributes = array('class'=>'form-control application_from_date','readonly'=>'readonly','placeholder'=>'Enter from date')) !!}
{!! Form::text('application_to_date',Input::old('application_to_date'), $attributes = array('class'=>'form-control application_to_date','readonly'=>'readonly','placeholder'=>'Enter to date')) !!}
{!! Form::text('number_of_day','', $attributes = array('class'=>'form-control number_of_day','readonly'=>'readonly','placeholder'=>'Number of day')) !!}
{!! Form::textarea('purpose', Input::old('purpose'), $attributes = array('class'=>'form-control purpose','id'=>'purpose','placeholder'=>'Enter purpose','cols'=>'30','rows'=>'3')) !!}
{{ Form::close() }}