Livewire lose value of object after render

Viewed 37

I want to know if there is a kind of order about which object renders first, because I have an array of id keys, and when I load them separately in a var_dump I get both of the value, but when I nest them it gives me an empty string on the uuid.

Component:

public $groupId = null, $schedules = [], $lessons = [];

protected $listeners = [
    'getGroups'
];

public function mount()
{
    $this->schedules = [];
    $this->groupId = null;
}

public function render()
{
    return view('livewire.scheduler.manager.scheduler');
}

public function getGroups($schedules, $groupId)
{
    $this->groupId = $groupId;
    $this->schedules = $schedules;
}

My livewire blade:

{{ $schedules[$groupId]['name'] }}

When I do a var_dump() on the $schedules and on $groupId I get the correct data, but when I combine them then the $groupId is empty in the blade.

0 Answers
Related