Answers for "how to calculate percentage profile completion in laravel"

PHP
0

how to calculate percentage profile completion in laravel

$maximumPoints  = 100;
 $profile = !empty($user->profile) ? 16.7 : 0;
 $username = !empty($user->username) ? 16.7 : 0;
 $zip_code = !empty($user->zip_code) ? 16.7 : 0;
 $gender = !empty($user->gender) ? 16.7 : 0;
 $aboutus = !empty($user->about_us) ? 16.7 : 0;
 $sportDetail = (count($userSportCategory) > 0) ? 16.7 : 0;
 $percentage = intval(($profile+$username+$zip_code+$gender+$sportDetail+$aboutus)*$maximumPoints/100);
 $user['percentage'] = $percentage.'%';
Posted by: Guest on February-15-2022

Code answers related to "how to calculate percentage profile completion in laravel"

Browse Popular Code Answers by Language