This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
jd12404
Hello,
I'm trying to order the data from a relation but it doesn't work. Any hint would be greatly appreciated:
protected function loadDates(){
$dateId = $this->param('slug');
$thedates = EventModel::where('slug',[$dateId])
->with([
'dates' => function($query) {
$query->orderByDesc('name');
}
])->get();
return $thedates;
}
No errors is showing... it's just not working.
Last updated
1-1 of 1