-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,8 @@ | |
|
||
use Carbon\Carbon; | ||
use Illuminate\Http\Request; | ||
use Zhiyi\Plus\Utils\Markdown; | ||
use function Zhiyi\Plus\setting; | ||
use Zhiyi\Plus\Models\Conversation; | ||
|
||
class SystemController extends Controller | ||
|
@@ -71,9 +73,12 @@ public function about() | |
* @author Foreach<[email protected]> | ||
* @return html | ||
*/ | ||
public function agreement() | ||
public function agreement(Markdown $markdown) | ||
{ | ||
$content = \Parsedown::instance()->setMarkupEscaped(true)->text(config('registerSettings.content', '')); | ||
$content = setting('user', 'register-setting', [ | ||
'content' => '# 服务条款及隐私政策', | ||
])['content'] ?? '# 服务条款及隐私政策'; | ||
$content = $markdown->toHtml($content); | ||
|
||
return view('agreement', ['content' => $content]); | ||
} | ||
|