Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to give points to referrer in laravel

$user = Auth::user();

      	if($user->ref_by)
          {
			$update_id = $user->ref_by;
          if (isset($update_id) && !empty($update_id)) {
            $user = User::find($update_id);
            $user->referral_point += 1;
            $user->save();
          }
        }
Comment

PREVIOUS NEXT
Code Example
Php :: PHP strcoll — Locale based string comparison 
Php :: laravel imap - Set message flags 
Php :: flash message laravel for incorrect password 
Php :: php artisan migrate stuck 
Php :: acf field without spaces 
Php :: permission for multisite in wp-config.php file 
Php :: symfony functional test clear session and cookies 
Php :: pegar porcentagem de um valor php 
Php :: codeigniter ellipsis in php read more text 
Php :: facetwp listing template archive 
Php :: menyimpan get di laravel 
Php :: php call static method from class 
Php :: remove dashboard mya ccount 
Php :: codeigniter admin panel with crud generator - 
Php :: Include Or Require Multiple Files On 1 Line 
Php :: fpdf tutorial php mysql 
Php :: Laravel appends child when referencing it in attribute function 
Php :: dir instalación ZendStudiopluginscom.zend.php.debug.debugger.win32.x86_10.6.0.v20140121-1240 esourcesphp.ini 
Php :: IlluminateDatabaseEloquentMassAssignmentException with message 
Php :: php domdocument get elements one by one 
Php :: laravel has many deep 
Php :: laravel gigapay update invoice 
Php :: Composer detected issues in your platform: Your Composer dependencies require a PHP version "= 7.4.0". 
Php :: laravel query buider 
Php :: load player avatar url 
Php :: phpmailer 5 string attachment 
Php :: php hide credit card middle numbers 
Php :: Online Food Ordering System Project SQL 
Php :: preg_replace rules for php 7.3 
Php :: Laravel 9.x Target class does not exist error at login application 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =