質問編集履歴
3
画像はり
test
CHANGED
File without changes
|
test
CHANGED
@@ -220,6 +220,8 @@
|
|
220
220
|
|
221
221
|
### ビュー
|
222
222
|
|
223
|
+
```
|
224
|
+
|
223
225
|
<!DOCTYPE html>
|
224
226
|
|
225
227
|
<html lang="ja">
|
@@ -256,10 +258,12 @@
|
|
256
258
|
|
257
259
|
</html>
|
258
260
|
|
259
|
-
|
261
|
+
```
|
260
262
|
|
261
263
|
### コントローラー
|
262
264
|
|
265
|
+
```
|
266
|
+
|
263
267
|
<?php
|
264
268
|
|
265
269
|
|
@@ -321,3 +325,7 @@
|
|
321
325
|
}
|
322
326
|
|
323
327
|
}
|
328
|
+
|
329
|
+
```
|
330
|
+
|
331
|
+
![イメージ説明](f843d8d8db18f408318cd93e0932f897.png)
|
2
文字化けを起こしていたので
test
CHANGED
File without changes
|
test
CHANGED
@@ -284,13 +284,13 @@
|
|
284
284
|
|
285
285
|
/**
|
286
286
|
|
287
|
-
* Display a listing of the resource.
|
287
|
+
** Display a listing of the resource.
|
288
|
-
|
288
|
+
|
289
|
-
*
|
289
|
+
**
|
290
|
-
|
290
|
+
|
291
|
-
* @return \Illuminate\Http\Response
|
291
|
+
** @return \Illuminate\Http\Response
|
292
|
-
|
292
|
+
|
293
|
-
*/
|
293
|
+
**/
|
294
294
|
|
295
295
|
public function index()
|
296
296
|
|
1
解決後のソース
test
CHANGED
File without changes
|
test
CHANGED
@@ -209,3 +209,115 @@
|
|
209
209
|
|
210
210
|
|
211
211
|
Laravel Framework 7.27.0
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
### 解決後、dd、ソース
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
### ビュー
|
222
|
+
|
223
|
+
<!DOCTYPE html>
|
224
|
+
|
225
|
+
<html lang="ja">
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
<head>
|
230
|
+
|
231
|
+
<meta charset="UTF-8">
|
232
|
+
|
233
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
234
|
+
|
235
|
+
<title>Document</title>
|
236
|
+
|
237
|
+
</head>
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
<body>
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
<h1>Hello,</h1>
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
<h1>{{ $proverbs->proverb_contact }}</h1>
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
</body>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
</html>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
### コントローラー
|
262
|
+
|
263
|
+
<?php
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
namespace App\Http\Controllers;
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
use Illuminate\Http\Request;
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
use Illuminate\Support\Facades\DB;
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
class ProverbFormController extends Controller
|
282
|
+
|
283
|
+
{
|
284
|
+
|
285
|
+
/**
|
286
|
+
|
287
|
+
* Display a listing of the resource.
|
288
|
+
|
289
|
+
*
|
290
|
+
|
291
|
+
* @return \Illuminate\Http\Response
|
292
|
+
|
293
|
+
*/
|
294
|
+
|
295
|
+
public function index()
|
296
|
+
|
297
|
+
{
|
298
|
+
|
299
|
+
//
|
300
|
+
|
301
|
+
$proverbs = DB::table('proverbs')->select('proverb_contact')->inRandomOrder()
|
302
|
+
|
303
|
+
->first();
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
// $aiuer='あいうえお';
|
308
|
+
|
309
|
+
// dd($aiuer);
|
310
|
+
|
311
|
+
dd($proverbs);
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
return view('Proverb.index', compact('proverbs'));
|
318
|
+
|
319
|
+
//return view('Proverb.index');
|
320
|
+
|
321
|
+
}
|
322
|
+
|
323
|
+
}
|