php - Laravel 5: sorting child records -


it not sort child records. have field in db called order here code:

$offer = offer::find($id); $offer->service->sortby('order', true);  return $offer;   

although array of services if use sortby, without there json data.

any ideas why not sort? thank in advance. if need code, please let me know.

the second parameter of sortby not true/false, it's int $options = sort_regular. laravel doesn't know make of true value.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

asp.net core mvc - How important is the global.json and src folder? -

Maven Javadoc 'Cannot find default setter' and fails -