Search
 
SCRIPT & CODE EXAMPLE
 

PHP

check mobile or email in laravel

protected function credentials(Request $request)
        {
          if(is_numeric($request->get('email'))){
            return ['phone'=>$request->get('email'),'password'=>$request->get('password')];
          }
          elseif (filter_var($request->get('email'), FILTER_VALIDATE_EMAIL)) {
            return ['email' => $request->get('email'), 'password'=>$request->get('password')];
          }
          return ['username' => $request->get('email'), 'password'=>$request->get('password')];
        }
Comment

PREVIOUS NEXT
Code Example
Php :: php loops 
Php :: hide add new link on cpt page 
Php :: php-pdo-returning-single-row 
Php :: docker php 7.2 add ext-mongodb 
Php :: set php var to html 
Php :: laravel attach once 
Php :: php loop array 
Php :: display image from mysqli database 
Php :: ci base url dynamic 
Php :: how to delete empty rows in phpmyadmin 
Php :: yesterday php 
Php :: laravel loop index 
Php :: where () laravel Eloquent 
Php :: php check if multiple inputs are empty 
Php :: Laravel - Query Builder Raw Query selectRaw 
Php :: get min value from array php 
Php :: how to get attachments to emails php 
Php :: php description limit 
Php :: php password verify 
Php :: php proper function comments 
Php :: include() in php 
Php :: what does defined di in php 
Php :: Stored Procedures in Laravel 
Php :: laravel where in array 
Php :: wordpress get product category name by termid 
Php :: php unique associative array by value 
Php :: json stringify to php array 
Php :: PHP MySQL Use The WHERE Clause 
Php :: how to get all the records with same ID in laravel 
Php :: rawbetween in laravel 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =