@extends('layouts.master') @section('title', 'PetroERP- An ERP for Petrol Pumps') @section('content')
@include('partials.heading', ['heading1' => 'Leaves', 'heading2' => 'List'])
Apply Leave @if(count($leaves)>0)
@foreach($leaves as $leave) @endforeach
Leave Type From To No. Of Days Applied Date Status Action
{{$leave->leaveTypeName}} {{date("d M Y", strtotime($leave->fromDate))}} {{date("d M Y", strtotime($leave->toDate))}} {{$leave->noOfDays}} {{date("d M Y", strtotime($leave->updated_at))}} @if($leave->status == 'p') Pending @elseif($leave->status == 'D') Disapproved @elseif($leave->status == 'A') Approved @elseif($leave->status == 'C') Cancelled @elseif($leave->status == 'V') Availed @endif {!! Form::open(['action' => ['LeavesController@destroy', $leave->id], 'method'=>'POST']) !!} {{Form::hidden('_method', 'DELETE')}} {{Form::button('', array('class'=>'btn btn-danger btn-xs confirmDelete', 'type'=>'submit')) }} {!! Form::close() !!}
{{$leaves->links()}}
@else

No Existing Leave Type in the Database

@endif
@endsection