Skip to content

Instantly share code, notes, and snippets.

@cursosdesarrolloweb
Created August 1, 2021 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cursosdesarrolloweb/ea0e75f5d53556ff60f201539f64611a to your computer and use it in GitHub Desktop.
Save cursosdesarrolloweb/ea0e75f5d53556ff60f201539f64611a to your computer and use it in GitHub Desktop.
<?php
$users = [
["name" => "andrés", "age" => 30],
["name" => "silvia", "age" => 25],
["name" => "luis", "age" => 21],
["name" => "marta", "age" => 33],
];
$collect = collect($users);
$collect->where("age", ">", 25)->all();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment