@if(session('success'))
{{session('success')}}

@endif @if(session('error'))
{{session('error')}}

@endif

{{ Auth::user()->name }}

{{--
@if ($errors->has('user_id')) {{ $errors->first('user_id') }} @endif--}}

{{ Auth::user()->leave_entitlement }} days

@php if(isset($getUserTotalLeaves)){ $total = 0; foreach($getUserTotalLeaves as $key => $value){ $total =+ $value->days; } } @endphp {{ Auth::user()->leave_entitlement - $total }} days

@if ($errors->has('leave_type')) {{ $errors->first('leave_type') }} @endif
@if ($errors->has('start_date')) {{ $errors->first('start_date') }} @endif
@if ($errors->has('end_date')) {{ $errors->first('end_date') }} @endif
@if ($errors->has('others')) {{ $errors->first('others') }} @endif
{{ csrf_field() }}