added tests, bug fixes and cleanup

This commit is contained in:
2023-03-13 16:03:32 +10:00
parent 44b123307a
commit 2cea90c2c8
21 changed files with 443 additions and 40 deletions

View File

@@ -14,10 +14,12 @@ class PostRequest extends BaseRequest
public function postRules()
{
return [
'slug' => 'string|min:6|unique:posts',
'title' => 'string|min:6|max:255',
'publish_at' => 'date',
'user_id' => 'uuid|exists:users,id',
'slug' => 'required|string|min:6|unique:posts',
'title' => 'required|string|min:6|max:255',
'publish_at' => 'required|date',
'user_id' => 'required|uuid|exists:users,id',
'content' => 'required|string|min:6',
'hero' => 'required|uuid|exists:media,id',
];
}
@@ -37,6 +39,8 @@ class PostRequest extends BaseRequest
'title' => 'string|min:6|max:255',
'publish_at' => 'date',
'user_id' => 'uuid|exists:users,id',
'content' => 'string|min:6',
'hero' => 'uuid|exists:media,id',
];
}
}