]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Api/ChapterApiController.php
Fixed occurances of altered titles in search results
[bookstack] / app / Http / Controllers / Api / ChapterApiController.php
index 13b3f9821171c77f664f94e7349f4a860abe76d3..6b226b5f0fcf57f6dcf0cb9d1254d4e5c73e8b5c 100644 (file)
@@ -14,16 +14,16 @@ class ChapterApiController extends ApiController
 
     protected $rules = [
         'create' => [
-            'book_id'     => 'required|integer',
-            'name'        => 'required|string|max:255',
-            'description' => 'string|max:1000',
-            'tags'        => 'array',
+            'book_id'     => ['required', 'integer'],
+            'name'        => ['required', 'string', 'max:255'],
+            'description' => ['string', 'max:1000'],
+            'tags'        => ['array'],
         ],
         'update' => [
-            'book_id'     => 'integer',
-            'name'        => 'string|min:1|max:255',
-            'description' => 'string|max:1000',
-            'tags'        => 'array',
+            'book_id'     => ['integer'],
+            'name'        => ['string', 'min:1', 'max:255'],
+            'description' => ['string', 'max:1000'],
+            'tags'        => ['array'],
         ],
     ];