I have an object which contains photo file paths,there caption and the order they apear in etc.
I need to sort the individual photos in order of the 'order', So that when i loop through each of the photos, they appear in the order specified by the order value.
Here is an example object:
object: Illuminate\Database\Eloquent\Collection Object
(
[items:protected] => Array
(
[0] => Photo Object
(
[timestamps] =>
[guarded:protected] => Array
(
[0] => id
)
[connection:protected] =>
[table:protected] =>
[primaryKey:protected] => id
[perPage:protected] => 15
[incrementing] => 1
[attributes:protected] => Array
(
[id] => 11
[res_id] => 1
[order] => 6
[owner_type] => Hotel
[owner_id] => 1
[gallery] =>
[caption] =>
[file] => Hotel_1_11.jpg
[deleted_at] =>
)
orderBy