Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel unique multiple columns

$table->unique(['mytext', 'user_id']);
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 :: turn off deprecated warnings php 
Php :: how validate the becrypt password in laravel 
Php :: php get parameter 
Php :: php get second last element of array 
Php :: php cloudflare get country from IP 
Php :: add categories to custom post type 
Php :: php fix array keys 
Php :: delete all records from table using button laravel Eloquent 
Php :: from user id to user role wordpress 
Php :: difference entre deux date php 
Php :: ternary operator in php 
Php :: debian php switch version 
Php :: part of url php 
Php :: create a modal livewire laravel 
Php :: php exception import 
Php :: no privileges to create databases phpmyadmin 
Php :: File Reading Modes PHP 
Php :: get absolute path php file 
Php :: where is php.ini file in ubuntu 
Php :: create function php 
Php :: laravel check if record exists 
Php :: what is the hashmap like in php 
Php :: sum of the array elements in php 
Php :: how to get plugin directory path in wordpress 
Php :: wp_create_user 
Php :: json_encode() in php 
Php :: laravel list of tables 
Php :: laravel truncate string laravel 8 
Php :: get array length using php 
Php :: php check if post file is empty 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =