title: Alternative to ->where() for Arrays in PHP/Laravel
body: <p>I made a function that gets all of the tickets from the Teamwork Desk API. I want to filter out the tickets by date created, but can't use ->where() on an array. Is there an alternative?</p>
  
  <p>Like I've stated before I've tried ->where(), googling didn't help me.</p>
  
  <pre><code>class ApiController extends Controller
  {
  public function getTickets() {
      $client = new \GuzzleHttp\Client([
          'base_uri' =&gt; config('teamwork.apilink'),
          'auth' =&gt; [config('teamwork.apikey'), 'x'],
          'verify' =&gt; false
      ]);
  
      $response = $client-&gt;get('v1/tickets/search.json', [
          'query' =&gt; ['sortDir' =&gt; 'desc', 'sortBy' =&gt; 'updatedAt']
      ])-&gt;where('id', 'LIKE', '4477011');
  
      $json = (string)$response-&gt;getBody()-&gt;getContents();
      dd(json_decode($json, true));
  }
  }
  </code></pre>
  
  <p>Without the where it pastes all the tickets, with the "where" it just errors = 'Call to undefined method GuzzleHttp\Psr7\Response::where()'</p>