<?php
if (!$user->isAuth()) {
redirect('/');
exit;
}
$all = $db->prepare('SELECT * FROM `tiket` WHERE `user` = ? ORDER BY `id` DESC');
$all -> execute([$user->get()->user_id]);
$all = $all -> fetchAll();
$peger = new ArrayPaginator('/support', 10);
$items = $peger->getItems($all);
echo $template->render('support.index',
['peger' => $peger,
'items' => $items,
'array' => ['Ожидает ответа','Есть новые сообщения']
]
);