Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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 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 :: Laravel unique Validation with multiple input field 
Php :: add a snippet in twig shopware 6 
Php :: php convert path from server url to link 
Php :: Call Python From PHP And Get Return Code 
Php :: Define memory limit in PHP 
Php :: livewire check no errors 
Php :: update php 
Php :: Best documentation tools for php 
Php :: php link 
Php :: pass the product name to form field cf7 woocommerce 
Php :: split date range into weeks php 
Php :: cors header ‘access-control-allow-origin’ missing IN PARTICULAR CAKEPHP API 
Php :: read input from user 
Php :: php website templates free download with database 
Php :: php xpath get all image 
Php :: session variable 
Php :: delete a migration laravel 
Php :: laravel automatically encrypt model atribute 
Php :: What is the name of scripting engine in PHP? 
Php :: php unit test 
Php :: php-array-delete-by-value-not-key 
Php :: php get last 3 elements of array 
Php :: show date php by letters 
Php :: PHPDoc @method 
Php :: how to run php on windows 
Php :: id type laravel 
Php :: main.php 
Php :: error_reporting(E_ERROR) 
Php :: php strings 
Php :: php print number 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =