@extends('layouts.backend') @section('styles') @endsection @section('page-header')

Leaves

Add Leave
@endsection @section('content')
@foreach ($leaves as $leave) @endforeach
Leave Type From To No of Days Reason Status Employee Actions
{{$leave->leaveType->type}} {{date_format(date_create($leave->from),"d M, Y")}} {{date_format(date_create($leave->to),"d M, Y")}} @php $start = new DateTime($leave->to); $end_date = new DateTime($leave->from); @endphp {{($start->diff($end_date,"%d")->days).' '. Str::plural('Days',$start->diff($end_date,"%d")->days)}} {{substr($leave->reason,0,10).' ........'}}

avatar {{$leave->employee->firstname}} {{$leave->employee->lastname}}

@endsection @section('scripts') @endsection