Files
ProxyPanel/app/Http/Controllers/MessageController.php
2025-07-16 21:36:14 +08:00

22 lines
552 B
PHP

<?php
namespace App\Http\Controllers;
use App\Models\NotificationLog;
use Illuminate\Contracts\View\View;
use Illuminate\Mail\Markdown;
class MessageController extends Controller
{
public function index(string $type, string $msgId): View
{
// if ($type === 'markdown') {
$log = NotificationLog::whereMsgId($msgId)->latest()->firstOrFail();
$title = $log->title;
$content = Markdown::parse($log->content)->toHtml();
return view('components.message', compact('title', 'content'));
// }
}
}