/** * Sort the array using the given callback. * * @param array $array * @param callable $callback * * @return array */ public static function sort($array, callable $callback) { return Collection::make($array)->sortBy($callback)->all(); }
/** * Fetches the data item keys from the persistent data storage. * * @return array list of data item keys. */ protected function fetchKeys() { return $this->collection->first() instanceof Fluent ? array_keys($this->collection->first()->attributes()) : array(); }