I have a mongodb table, that contains a fixture of a soccer tournament, so every matchweek looks like this:
"number": 1,
"games" : [
{
"estadio" : "G C",
"arbitro" : "M",
"resultado" : "vs",
"editor" : "Pepe",
"id" : 1,
"equipo_local" : "Las Palmas",
"equipo_visitante" : "Villareal",
"fecha" : "10/05/2018",
"horario" : "16:00",
"hora" : "12:12"
},
{
"estadio" : "Ciudad de Valencia",
"arbitro" : "A Confirmar",
"resultado" : "vs",
"editor" : "No Asignado",
"id" : 2,
"equipo_local" : "Levante",
"equipo_visitante" : "Deportivo",
"fecha" : "28/01/2019",
"horario" : "18:00"
},
..
]
"number": 2,
"games": [..]
...
I'm working with Laravel and Jessengers, and I want to update an element inside a specific matchweek and a specific game. For example, I want to change the editor of matchweek 1 and game with id 1, but I'm having trouble doing that
With this, I can get the matchweek but how do I continue?
$number = (int) request('number');
$f = Fecha::where('number', $number)->first();