laravel validation with database condition using validation function
I have a laravel controller PostContoller and Post model I want to use name condition with database table
My table name posts and make name unique and where post_type = example_post_type_name
Please help?
$this->validate($request, [
'title' => 'required|max:191',
'name' => 'required|max:191|unique:lcf_posts',
'status' => 'required|max:191',
]);