Array ( [id] => how-to-get-the-first-row-of-grouped-data-after-sorting-by-field ) Undefined index: location