Skip to content

Commit 156daea

Browse files
committed
Example folder structure view added
1 parent d3dd21a commit 156daea

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
/*
3+
* File: folder_structure.blade.php
4+
* Category: View
5+
* Author: M.Goldenbaum
6+
* Created: 15.09.18 19:53
7+
* Updated: -
8+
*
9+
* Description:
10+
* -
11+
*/
12+
13+
/**
14+
* @var \Webklex\IMAP\Support\FolderCollection $paginator
15+
* @var \Webklex\IMAP\Folder $oFolder
16+
*/
17+
18+
?>
19+
<table>
20+
<thead>
21+
<tr>
22+
<th>Folder</th>
23+
<th>Unread messages</th>
24+
</tr>
25+
</thead>
26+
<tbody>
27+
@if($paginator->count() > 0)
28+
@foreach($paginator as $oFolder)
29+
<tr>
30+
<td>{{$oFolder->name}}</td>
31+
<td>{{$oFolder->search()->unseen()->leaveUnread()->setFetchBody(false)->setFetchAttachment(false)->get()->count()}}</td>
32+
</tr>
33+
@endforeach
34+
@else
35+
<tr>
36+
<td colspan="4">No folders found</td>
37+
</tr>
38+
@endif
39+
</tbody>
40+
</table>
41+
42+
{{$paginator->links()}}

0 commit comments

Comments
 (0)