mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-28 22:41:13 -05:00
refactor: swap sorting in laravel to ordering in the database
This commit is contained in:
@@ -26,7 +26,7 @@ class ResolutionController extends Controller
|
||||
*/
|
||||
public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$resolutions = Resolution::all()->sortBy('position');
|
||||
$resolutions = Resolution::orderBy('position')->get();
|
||||
|
||||
return view('Staff.resolution.index', ['resolutions' => $resolutions]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user