]>
BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/CommentController.php
projects
/
bookstack
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #3556 from GongMingCai/development
[bookstack]
/
app
/
Http
/
Controllers
/
CommentController.php
diff --git
a/app/Http/Controllers/CommentController.php
b/app/Http/Controllers/CommentController.php
index dfe468f5f6f0992f9ebe73d0639567e8dec40141..9804f6d39a0b077448a84a887b8563c6826a6047 100644
(file)
--- a/
app/Http/Controllers/CommentController.php
+++ b/
app/Http/Controllers/CommentController.php
@@
-24,8
+24,8
@@
class CommentController extends Controller
public function savePageComment(Request $request, int $pageId)
{
$this->validate($request, [
public function savePageComment(Request $request, int $pageId)
{
$this->validate($request, [
- 'text' =>
'required|string'
,
- 'parent_id' =>
'nullable|integer'
,
+ 'text' =>
['required', 'string']
,
+ 'parent_id' =>
['nullable', 'integer']
,
]);
$page = Page::visible()->find($pageId);
]);
$page = Page::visible()->find($pageId);
@@
-53,7
+53,7
@@
class CommentController extends Controller
public function update(Request $request, int $commentId)
{
$this->validate($request, [
public function update(Request $request, int $commentId)
{
$this->validate($request, [
- 'text' =>
'required|string'
,
+ 'text' =>
['required', 'string']
,
]);
$comment = $this->commentRepo->getById($commentId);
]);
$comment = $this->commentRepo->getById($commentId);