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 Validation with multiple column

'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 :: add a snippet in twig shopware 6 
Php :: php get day of week number 
Php :: convertir date php en français 
Php :: isset in php 
Php :: php function to get the last value of array 
Php :: Target [LaravelFortifyContractsCreatesNewUsers] is not instantiable. 
Php :: php How to remove from a multidimensional array all duplicate elements including the original 
Php :: symfony get api data 
Php :: laravel how to check app env 
Php :: how to fetch associate data from csv in php 
Php :: connexion à la base de donnée microsoftsqlserver avec php 
Php :: Cannot modify header information - headers already sent by 
Php :: How to go back to the main page in php 
Php :: laravel edit method 
Php :: many to many relationship laravel 
Php :: url rewrite htaccess php 
Php :: download image from mysql using php 
Php :: wordpress shortcode api 
Php :: png to pdf 
Php :: php += 
Php :: laravel set timezone dynamically 
Php :: laravel many to many relationship 
Php :: publish spatie/permission 
Php :: Get All dates of a month 
Php :: yii2 oauth2 
Php :: php inner join array 
Php :: how to delete database in phpmyadmin 
Php :: find_in_set in laravel 
Php :: convert html to pdf php 
Php :: laravel find 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =