質問編集履歴
1
ご質問の箇所を追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -135,3 +135,23 @@
|
|
135
135
|
|
136
136
|
|
137
137
|
宜しくお願いいたします。
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
### 追記
|
142
|
+
|
143
|
+
```Item
|
144
|
+
|
145
|
+
public function getItems($article)
|
146
|
+
|
147
|
+
{
|
148
|
+
|
149
|
+
$items_order = explode(",", $article->item_order);
|
150
|
+
|
151
|
+
$items_order_concat = implode(',', $items_order);
|
152
|
+
|
153
|
+
return Item::whereIn('id', $items_order)->orderByRaw("FIELD(id, $items_order_concat)")->get(); //エラーの箇所です
|
154
|
+
|
155
|
+
}
|
156
|
+
|
157
|
+
```
|