Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Validate email ignore id Laravel

public function rules (){
		$rules = [
			'email' => 'required|email|unique:tb_users,email,'.$this->user->id,
            'username' => 'required|email|unique:tb_users,username,'.$this->user->id,
			'first_name' => 'required',
			'last_name' => 'required',
		];

		return $rules;
	}
Comment

ignore user id on email validation laravel

'email' => 'unique:table_name,column_name,'.$this->id.',id'
Comment

PREVIOUS NEXT
Code Example
Php :: laravel get route action 
Php :: use external variable in php function 
Php :: php response image 
Php :: mysql gone away error in php 
Php :: array_filter in php 
Php :: pessimistic locking laravel 
Php :: PHP OOP - Inheritance 
Php :: php is_link 
Php :: laravel follow and unfollow relationship 
Php :: clear the compiled classes 
Php :: laravel get() 
Php :: access paginator object attribute in laravel 
Php :: php triple quotes 
Php :: how to make primary key and foreign key in phpmyadmin 
Php :: magento Fatal error: Allowed memory size of 134217728 bytes exhausted 
Php :: reset admin password magento 2 
Php :: php fn closure 
Php :: Warning: password_verify() expects parameter 2 to be string, array given in 
Php :: what is route namespace in laravel 
Php :: php if statement with multiple conditions 
Php :: :: in php 
Php :: default time of session in php 
Php :: php data types 
Php :: laravel gate 
Php :: wordpress website redirecting to install page after migration 
Php :: Laravel eger load 
Php :: codeigniter ellipsis in php read more text 
Php :: php run cron evey hour 
Php :: php to display variables 
Php :: PHP Superglobal - $_GET 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =