Answers for "validation for unique field in laravel"

PHP
2

Laravel Validate unique column

'business_name' => 'required|unique:companies,name',
Posted by: Guest on August-31-2021
1

set unique value validation for laravel form request

use Illuminate\Validation\Rule;

public function rules()
{
    return [
	    'title' => [
		    'required',
		    Rule::unique('posts', 'title')->ignore($this->post)
	    ]
    ]; 
}
Posted by: Guest on January-03-2021

Code answers related to "validation for unique field in laravel"

Browse Popular Code Answers by Language