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)) { if(!empty($query)) {
$qs = ''; $qs = [];
foreach($query as $qk => $qv) { $qs .= $qk .'='. $qv; } foreach($query as $qk => $qv) { $qs[] = $qk .'='. $qv; }
$link = $link .'?'. $qs; $link = $link .'?'. implode('&', $qs);
} }
Link::where('id', $linkId)->increment('click_number', 1); Link::where('id', $linkId)->increment('click_number', 1);