Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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();
          }
        }
 
PREVIOUS NEXT
Tagged: #give #points #referrer #laravel
ADD COMMENT
Topic
Name
4+6 =