fix redirect a link with multiple query string

This commit is contained in:
aprillio 2021-07-06 17:35:22 +07:00
parent e7ad5fcb42
commit 641b4397a1
1 changed files with 3 additions and 3 deletions

View File

@ -94,9 +94,9 @@ class UserController extends Controller
}
if(!empty($query)) {
$qs = '';
foreach($query as $qk => $qv) { $qs .= $qk .'='. $qv; }
$link = $link .'?'. $qs;
$qs = [];
foreach($query as $qk => $qv) { $qs[] = $qk .'='. $qv; }
$link = $link .'?'. implode('&', $qs);
}
Link::where('id', $linkId)->increment('click_number', 1);