0
Ich habe ein Array wie folgt aus:Suche in Werte in Array und ein Einen Wert
//the result of `dd()` function in laravel
Collection {#401 ▼
#items: array:2 [▼
0 => {#400 ▼
+"tutorial_package_count": 2
+"tutorial_package_id": 1
+"tutorial_id": 1
}
1 => {#402 ▼
+"tutorial_package_count": 1
+"tutorial_package_id": 2
+"tutorial_id": 2
}
]
}
nehme an, ich habe eine Variable als $tutorial_id = 1
, jetzt möchte ich Wert von tutorial_package_count
zu bekommen. hier möchte ich 2
.
Ich möchte keine Schleife verwenden.
Sind Sie mit beredten? In diesem Fall: where ('tutorial_id', 1) –