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

javascript - How to process users in one specific order using map o each function? -

java - Two interface have same method name with different return type -

javascript - Linking from page A to a specific iframe on page B -