drop unique validator

This commit is contained in:
Alexander Yakovlev 2024-03-13 18:32:53 +06:00
parent 372a439d3b
commit c9666a45d5

View file

@ -32,10 +32,10 @@ class PostController extends Controller
}
if ($request->getMethod() === 'POST') {
$validated = $request->validate([
'content' => 'required|unique:posts',
'slug' => 'string|max:255|unique:posts',
'content' => 'required',
'slug' => 'string|max:255',
'is_draft' => 'int|max:1',
'title' => 'required|string|max:255|unique:posts',
'title' => 'required|string|max:255',
'password' => 'string|max:255',
]);
$post->fill($validated);