public function records() { $records = Record::orderBy('score', 'DESC')->with('category')->limit(50)->get(); return view('records')->with('records', $records); }
public function getAllOrderedBy($column = 'created_at', $order = 'desc') { $roles = Record::orderBy($column, $order)->get(); return $roles; }