[Vuejs]-Laravel Vue.js after patch request get doesn't load all the data

0👍

Update:
I solved it by creating an empty array where I push each player after adding a username.

$oldTeam = $event->participants()->get();
$team = [];
foreach ($oldTeam as $player) {
    $user = User::where('id', $player->user_id)->first();
    $player->username = $user->username;
    array_push($team, $player);
}

Leave a comment