Exemple #1
0
/**
 * Search for songs; return a maximum of 10
 *
 * @param  string $search
 * @return collection $songs
 */
function songSearch($search)
{
    return Song::where('title', 'like', $search)->orWhere('title_2', 'like', $search)->orWhere('ccli_no', 'like', $search)->orWhere('book_ref', 'like', $search)->orWhere('author', 'like', $search)->orWhere('lyrics', 'like', $search)->take(10)->get();
}