Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel unique multiple columns

$table->unique(['mytext', 'user_id']);
Comment

laravel validation unique two columns

[
     'column_1' => 'required|unique:TableName,column_1,' . $this->id . ',id,colum_2,' . $this->column_2
]
Comment

unique check with multiple columns laravel validation

'name' => 'unique:table,field,NULL,id,field1,value1,field2,value2,field3,value3'
Comment

laravel unique validation on multiple columns

'mobile_no' 
  => 'unique:users,mobile_no,NULL,id,country_id,'.request('country_id');
Comment

Laravel Unique Multiple Column validation

'name'        => 'required|max:150|unique:course_lessons,name,NULL,id,course_id,' . request('course_id'),
 "<input_filed_name>" => "valiadtionRule"|"ValidationRule"|"unique:<tableName>,<validateableField>,<ignoreableID>,<tablePrimaryKey>,<column1>,<column1Value>,<column2>,<column2Value>"
Comment

Laravel unique cheque using multiple column

public function rules()
{            
    return [
       'column_1' => 'required|unique:TableName,column_1,' . $this->id . ',id,colum_2,' . $this->column_2 . ',colum_3,' . $this->column_3,
    ];
}
Comment

laravel unique validation on multiple columns

'exam_category_id' => Rule::unique('exams')->where(function ($query) use ($request) {
   return $query->where('exam_name', $request->exam_name)
      ->where('exam_year', $request->exam_year)
      ->where('student_id', $request->student_id);
})
Comment

PREVIOUS NEXT
Code Example
Php :: php pass function as callback 
Php :: php function use 
Php :: fixing unclosed html tags 
Php :: png to pdf 
Php :: PHP OOP - Constructor 
Php :: send data with window.location.href 
Php :: mysql gone away error in php 
Php :: get id from object 
Php :: laravel Pushing To Array Session Values 
Php :: Laravel whereHas with count 
Php :: get image field in custom post type category taxonomy 
Php :: iframe site bi link laravel 
Php :: show date php by letters 
Php :: wordpress get all published post 
Php :: PHP script to download all images from URL 
Php :: echo foreach 
Php :: how to append an array into associative array 
Php :: how to split sting in php 
Php :: Warning: password_verify() expects parameter 2 to be string, array given in 
Php :: self vs this in php 
Php :: laravel withValidator 
Php :: input if not null laravel 
Php :: Redirect with named route in Laravel 
Php :: how to create object in php 
Php :: php-oop 
Php :: php leggere file txt riga per riga 
Php :: merge multiple exceptions php 
Php :: google sheets to php equation 
Php :: PHP Parse error: Unexpected character "" (ASCII 22) on line 1 
Php :: wordpress set category front end 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =