Alaouy\Youtube\Youtube::search PHP Method

    public function search($q, $maxResults = 10, $part = ['id', 'snippet'])
    {
        $params = array('q' => $q, 'part' => implode(', ', $part), 'maxResults' => $maxResults);
        return $this->searchAdvanced($params);
    }

Usage Example

 public function testSearch()
 {
     $limit = rand(3, 10);
     $response = $this->youtube->search('Android', $limit);
     $this->assertEquals($limit, count($response));
     $this->assertEquals('youtube#searchResult', $response[0]->kind);
 }