Laravel unique validation - development

Laravel unique validation

How can I perform this migration rule to laravel validation rule

$table->unique(['field_1', 'field_2']);

so far I tried this but I still got no result?

$rules = [
            'slug' => 'required|max:70|unique:categories,slug,null,id,category_type,' . Blog::class . '|regex:/(^[A-Za-z-_ ]+$)+/',
            'title' => 'required|max:70',
        ];



from Laravel Questions and Answers https://laravelquestions.com/php/laravel-unique-validation/
via Lzo Media

Comments

Popular posts from this blog

ng-show doesn’t work correct with value boolean

ng-include of inline SVG does not display gradient except in Chrome

Using PHP and MySQL data to generate PDF letters like in MS Word mailmerge functionality - development