@php $file_type = "vnd.ms-excel"; $file_name= "UsersDetails.xls"; header("Content-Type: application/$file_type"); header("Content-Disposition: attachment; filename=$file_name"); $a=0; @endphp @if(!empty($Result)) @foreach($Result as $eachUserDet) @php $a++; $ActiveStatus=$eachUserDet->ActiveStatus; $Style=""; if($ActiveStatus==0) { $Style="color:red;"; } $CreatedON=$eachUserDet->created_at; $CreatedON=date('d-m-Y',strtotime($CreatedON)); @endphp @endforeach
S.No Name Email Id username Created on
{{$a}} {{$eachUserDet->name}} {{$eachUserDet->email}} {{$eachUserDet->username}} {{$CreatedON}}
@endif