mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-23 11:39:19 -05:00
refactor: swap sorting in laravel to ordering in the database
This commit is contained in:
@@ -57,7 +57,7 @@ class SubtitleController extends Controller
|
||||
public function create(int $torrentId): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$torrent = Torrent::withAnyStatus()->findOrFail($torrentId);
|
||||
$mediaLanguages = MediaLanguage::all()->sortBy('name');
|
||||
$mediaLanguages = MediaLanguage::orderBy('name')->get();
|
||||
|
||||
return view('subtitle.create', ['torrent' => $torrent, 'media_languages' => $mediaLanguages]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user