Skip to content

Instantly share code, notes, and snippets.

View neo13's full-sized avatar

Aaron neo13

  • Freelance
  • Edmonton, AB, Canada
View GitHub Profile
@neo13
neo13 / ModelHelper.php
Last active December 16, 2015 06:19
Laravel Administrator bundle / ModelHelper / getRows() There was a problem in this method that stopped people to use this bundle with PostgreSQL, this is the modified version that helps you get over that problem
/**
* Helper that builds a results array (with results and pagination info)
* It's same as getRows but it works for pgsql
*
* @param ModelConfig $config
* @param array $sort (with 'field' and 'direction' keys)
* @param array $filters (see Field::getFilters method for the value types)
*/
public static function getRows($config, $sort = null, $filters = null)
{