Files
breadcrumb-the-shire/pages/admin/mail-log/view($id).php

25 lines
746 B
PHP
Raw Normal View History

2026-02-04 23:31:53 +01:00
<?php
use MintyPHP\Buffer;
2026-03-05 11:17:42 +01:00
use MintyPHP\Router;
2026-02-04 23:31:53 +01:00
use MintyPHP\Support\Flash;
use MintyPHP\Support\Guard;
Guard::requireLogin();
2026-03-04 15:56:58 +01:00
Guard::requireAbility(\MintyPHP\Service\Access\OperationsAuthorizationPolicy::ABILITY_ADMIN_MAIL_LOG_VIEW);
2026-02-04 23:31:53 +01:00
$mailLogId = (int) ($id ?? 0);
2026-03-04 15:56:58 +01:00
$mailLogService = app(\MintyPHP\Service\Mail\MailLogService::class);
2026-02-23 12:58:19 +01:00
$mailLog = $mailLogId > 0 ? $mailLogService->find($mailLogId) : null;
2026-02-04 23:31:53 +01:00
if (!$mailLog) {
Flash::error('Mail log not found', 'admin/mail-log', 'mail_log_not_found');
Router::redirect('admin/mail-log');
}
Buffer::set('title', t('View mail log'));
$breadcrumbs = [
['label' => t('Home'), 'path' => 'admin'],
['label' => t('Mail logs'), 'path' => 'admin/mail-log'],
['label' => t('View')],
];