Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel rule unique ignore

use IlluminateSupportFacadesValidator;
use IlluminateValidationRule;

Validator::make($data, [
    'email' => [
        'required',
        Rule::unique('users')->ignore($user->id),
    ],
]);
Comment

laravel rule unique where

'required|email|unique:company_users,email_address,NULL,id,company_id,' . $request->company_id
Comment

Laravel unique with Validation rule

'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

PREVIOUS NEXT
Code Example
Php :: Delete an array in multidimensional array php 
Php :: PHP time limit (max_execution_time): 
Php :: php 7 strict mode 
Php :: convert image to base64 in laravel 
Php :: ::update() should not be called statically 
Php :: fetch value from json link in php 
Php :: cron run 1 time 
Php :: php money_format currency symbol 
Php :: convert byte to megabyte php 
Php :: blade if 
Php :: add log in laravel 
Php :: php file upload error 
Php :: php rsa encryption 
Php :: php remove anchor tag from string 
Php :: php time ago 
Php :: Convert String to Date and Date-Time in PHP 
Php :: get taxonomy term meta by id 
Php :: mac address php 
Php :: woocommerce profile photo upload 
Php :: php ob_start 
Php :: laravel create text file 
Php :: total days between two dates carbon 
Php :: brew downgrade php 8 to 7.4 
Php :: get_the_author_meta display name 
Php :: format date in php 
Php :: how to make-migrations in laravel 
Php :: sending data from one website to another in php 
Php :: how to use plugin shortcode in wordpress template 
Php :: laravel validation array unique values 
Php :: laravel array_pluck 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =