X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/c429cf78187e80deb63982a282a1c6889f30291a..refs/pull/3043/head:/app/Http/Controllers/Api/ChapterApiController.php diff --git a/app/Http/Controllers/Api/ChapterApiController.php b/app/Http/Controllers/Api/ChapterApiController.php index 13b3f9821..6b226b5f0 100644 --- a/app/Http/Controllers/Api/ChapterApiController.php +++ b/app/Http/Controllers/Api/ChapterApiController.php @@ -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'], ], ];