<?php

namespace App\Http\Controllers\Admin\Core\Mail;

use App\Datatables\Admin\Core\Mail\MailLogsDataTable;
use App\Repositories\Core\Mail\MailLogs;

class MailLogController extends Controller
{
    public function __construct()
    {
        // $this->middleware('ability:admin');
    }

    public function index(MailLogsDataTable $dataTable)
    {
        return $dataTable->render('admin.Core.Mail.MailLog.index', $data ?? []);
    }

    public function show($id)
    {
        $data['message'] = MailLogs::getParsed($id);

        return view('admin.Core.Mail.MailLog.modal', $data);
    }
}
