mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-02 18:48:36 +00:00
22 lines
552 B
PHP
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'));
|
|
// }
|
|
}
|
|
}
|