app/Services/SearchService.php
public function searchMedia(array $trees, array $search, int $offset = 0, int $limit = PHP_INT_MAX): Collection
    {
        $query = DB::table('media');

        $this->whereTrees($query, 'media.m_file', $trees);
        $this->whereSearch($query, 'm_gedcom', $search);

        return $this->paginateQuery($query, Media::rowMapper(), GedcomRecord::accessFilter(), $offset, $limit);
    }
public function searchMedia(array $trees, array $search, int $offset = 0, int $limit = PHP_INT_MAX): Collection
    {
        $query = DB::table('media');

        $this->whereTrees($query, 'media.m_file', $trees);
        $this->whereSearch($query, 'm_gedcom', $search);

        return $this->paginateQuery($query, Media::rowMapper(), GedcomRecord::accessFilter(), $offset, $limit);
    }
public function searchMedia ( array $ trees , array $ search , int $ offset = 0 , int $ limit = PHP_INT_MAX ) : Collection { $ query = DB :: table ( 'media' ) ; $ this -> whereTrees ( $ query , 'media.m_file' , $ trees ) ; $ this -> whereSearch ( $ query , 'm_gedcom' , $ search ) ; return $ this -> paginateQuery ( $ query , Media :: rowMapper ( ) , GedcomRecord :: accessFilter ( ) , $ offset , $ limit ) ; }
Search for media objects.

@param Tree[]   $trees
@param string[] $search
@param int      $offset
@param int      $limit

@return Collection
@return Media[]
Search for media objects .