here is solution
$referal_user = $request->ref;
$referal_email = DB::table('admins')->where('mobile', $referal_user)->first();
$referal_id = $referal_email->id;
$right_count = $referal_email->no_user_right;
$list_all_right_user = $referal_email->user_listing_right;
$ref = $request->ref;
$mobile = $request->mobile;
$user_listing_left = $referal_email->user_listing_left;
while( $refUser = Admin::where('mobile', $ref)->first() )
{
$refUser->user_left = $request->email;
$refUser->user_listing_left = $refUser->user_listing_left . "," .$request->email;
$refUser->save();
// Update $ref to find the next guy
$ref = $refUser->ref;
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community