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
Post a Comment