mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-06 20:50:01 +00:00
Code variables type declaration
This commit is contained in:
@@ -3,20 +3,19 @@
|
||||
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)
|
||||
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();
|
||||
//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'));
|
||||
}
|
||||
|
||||
return false;
|
||||
return view('components.message', compact('title', 'content'));
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user