回答編集履歴
2
desc
answer
CHANGED
@@ -5,4 +5,4 @@
|
|
5
5
|
|
6
6
|
ormを使えばカラム名のsqlインジェクションチェックもライブラリでしてくれる思います。
|
7
7
|
https://readouble.com/laravel/5.dev/ja/eloquent.html
|
8
|
-
Sample::orderBy($scoretype,'
|
8
|
+
Sample::orderBy($scoretype,'desc')->get();
|
1
method修正
answer
CHANGED
@@ -5,4 +5,4 @@
|
|
5
5
|
|
6
6
|
ormを使えばカラム名のsqlインジェクションチェックもライブラリでしてくれる思います。
|
7
7
|
https://readouble.com/laravel/5.dev/ja/eloquent.html
|
8
|
-
Sample::
|
8
|
+
Sample::orderBy($scoretype,'DESC')->get();
|