rossiluca
3 months ago
160
4
Laravel

Append links with same name

Posted 3 months ago by rossiluca

Hello guys i'm trying to use the appends function on eloquent to append some links from a field.

For example i'm trying to append the "status" in the links which may be multiple: http://myapp.test/participants?status=1&status=5

But when i use:

foreach ($params["status"] as $key => $value) {
    $participants->appends(['status' => $value])->links();
}

It only appends the status 5

Please sign in or create an account to participate in this conversation.