質問編集履歴
2
エラー画面のdebugの内容を追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -504,4 +504,84 @@
|
|
504
504
|
|
505
505
|
}
|
506
506
|
|
507
|
-
```
|
507
|
+
```
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
|
513
|
+
<<追記2>>
|
514
|
+
|
515
|
+
エラー画面のDebugタブの内容を追記します。
|
516
|
+
|
517
|
+
```
|
518
|
+
|
519
|
+
Query
|
520
|
+
|
521
|
+
|
522
|
+
|
523
|
+
Query select
|
524
|
+
|
525
|
+
*
|
526
|
+
|
527
|
+
from
|
528
|
+
|
529
|
+
`sessions`
|
530
|
+
|
531
|
+
where
|
532
|
+
|
533
|
+
`id` = ?
|
534
|
+
|
535
|
+
limit
|
536
|
+
|
537
|
+
1
|
538
|
+
|
539
|
+
Time 2.47
|
540
|
+
|
541
|
+
Connection name mysql
|
542
|
+
|
543
|
+
0 ハッシュ値
|
544
|
+
|
545
|
+
|
546
|
+
|
547
|
+
Query
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
Query select
|
552
|
+
|
553
|
+
*
|
554
|
+
|
555
|
+
from
|
556
|
+
|
557
|
+
`sessions`
|
558
|
+
|
559
|
+
where
|
560
|
+
|
561
|
+
`id` = ?
|
562
|
+
|
563
|
+
limit
|
564
|
+
|
565
|
+
1
|
566
|
+
|
567
|
+
Time 0.67
|
568
|
+
|
569
|
+
Connection name mysql
|
570
|
+
|
571
|
+
0 1
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
Log
|
576
|
+
|
577
|
+
Message POST
|
578
|
+
|
579
|
+
Level debug
|
580
|
+
|
581
|
+
url
|
582
|
+
|
583
|
+
http://localhost/logout
|
584
|
+
|
585
|
+
request { "_token": "ハッシュ値", "_flash": { "old": [], "new": [] }, "_previous": { "url": "http://localhost" }, "login_web_ハッシュ値": 1 }
|
586
|
+
|
587
|
+
```
|
1
Web.phpとKernel.phpを追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -209,3 +209,299 @@
|
|
209
209
|
非常に冗長な説明になりましたが、何か心当たりがあればご教授頂きたいです。
|
210
210
|
|
211
211
|
よろしくお願いします。
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
<<追記>>
|
218
|
+
|
219
|
+
``web.php``
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
```
|
224
|
+
|
225
|
+
<?php
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
use Illuminate\Support\Facades\Route;
|
230
|
+
|
231
|
+
use Illuminate\Http\Request;
|
232
|
+
|
233
|
+
use Illuminate\Support\Facades\Auth;
|
234
|
+
|
235
|
+
use App\Http\Controllers\ChangeEmailController;
|
236
|
+
|
237
|
+
use App\Http\Controllers\ChangePasswordController;
|
238
|
+
|
239
|
+
use App\Http\Controllers\FollowController;
|
240
|
+
|
241
|
+
use App\Http\Controllers\UserController;
|
242
|
+
|
243
|
+
use App\Http\Controllers\HomeController;
|
244
|
+
|
245
|
+
use App\Http\Controllers\LikeController;
|
246
|
+
|
247
|
+
use App\Http\Controllers\ReviewController;
|
248
|
+
|
249
|
+
use App\Http\Controllers\RankingController;
|
250
|
+
|
251
|
+
use App\Http\Controllers\SchoolController;
|
252
|
+
|
253
|
+
use App\Models\Review;
|
254
|
+
|
255
|
+
use App\Events\MessageSent;
|
256
|
+
|
257
|
+
use App\Events\CommentSent;
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
/*
|
262
|
+
|
263
|
+
|--------------------------------------------------------------------------
|
264
|
+
|
265
|
+
| Web Routes
|
266
|
+
|
267
|
+
|--------------------------------------------------------------------------
|
268
|
+
|
269
|
+
|
|
270
|
+
|
271
|
+
| Here is where you can register web routes for your application. These
|
272
|
+
|
273
|
+
| routes are loaded by the RouteServiceProvider within a group which
|
274
|
+
|
275
|
+
| contains the "web" middleware group. Now create something great!
|
276
|
+
|
277
|
+
|
|
278
|
+
|
279
|
+
*/
|
280
|
+
|
281
|
+
Route::get('/', [HomeController::class, 'index'])->name('top');
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
Route::get('/signup', [UserController::class, 'add'])->name('signup');
|
286
|
+
|
287
|
+
Route::post('/users/create', [UserController::class, 'create']);
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
Route::get('/contact', [HomeController::class, 'showContactForm']);
|
292
|
+
|
293
|
+
Route::post('/contact', [HomeController::class, 'receiveContact']);
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
Route::middleware(['auth'])->group(function() {
|
298
|
+
|
299
|
+
Route::get('/users', [UserController::class, 'index'])->name('mypage');
|
300
|
+
|
301
|
+
Route::get('/users/edit', [UserController::class, 'edit'])->name('user-edit');
|
302
|
+
|
303
|
+
Route::post('/users/update', [UserController::class, 'update'])->name('user-update');
|
304
|
+
|
305
|
+
Route::delete('/users/delete', [UserController::class, 'delete']);
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
Route::get('/reviews/school/{school_id}', [ReviewController::class, 'showList']);
|
310
|
+
|
311
|
+
Route::get('/reviews/review/{id}', [ReviewController::class, 'showReview']);
|
312
|
+
|
313
|
+
Route::get('/reviews', [ReviewController::class, 'add']);
|
314
|
+
|
315
|
+
Route::post('/reviews/create', [ReviewController::class, 'create']);
|
316
|
+
|
317
|
+
Route::delete('/reviews/delete', [ReviewController::class, 'delete']);
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
Route::get('/schools/{id}', [SchoolController::class, 'showSchool'])->name('school');
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
Route::get('/rankings', [RankingController::class, 'index'])->name('ranking');
|
326
|
+
|
327
|
+
Route::post('/rankings', [RankingController::class, 'showRanking']);
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
Route::get('/follow/{id}', [FollowController::class, 'getCurrentStatus']);
|
332
|
+
|
333
|
+
Route::post('/follow', [FollowController::class, 'switchFollow']);
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
Route::get('/like/{id}', [LikeController::class, 'current']);
|
338
|
+
|
339
|
+
Route::post('/like', [LikeController::class, 'switchLike']);
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
Route::get('/password/change', [ChangePasswordController::class, 'showChangePasswordView']);
|
344
|
+
|
345
|
+
Route::post('/password', [ChangePasswordController::class, 'changePassword']);
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
Route::get('/email/edit', [ChangeEmailController::class, 'showChangeEmailForm']);
|
350
|
+
|
351
|
+
Route::post('/email', [ChangeEmailController::class, 'sendChangeEmailLink'])->name('email');
|
352
|
+
|
353
|
+
Route::post('/email/reset', [ChangeEmailController::class, 'reset']);
|
354
|
+
|
355
|
+
});
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
require __DIR__.'/auth.php';
|
360
|
+
|
361
|
+
```
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
``app/Http/Kernel.php``
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
```
|
370
|
+
|
371
|
+
<?php
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
namespace App\Http;
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
use App\Http\Middleware\RequestLogger;
|
380
|
+
|
381
|
+
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
class Kernel extends HttpKernel
|
386
|
+
|
387
|
+
{
|
388
|
+
|
389
|
+
/**
|
390
|
+
|
391
|
+
* The application's global HTTP middleware stack.
|
392
|
+
|
393
|
+
*
|
394
|
+
|
395
|
+
* These middleware are run during every request to your application.
|
396
|
+
|
397
|
+
*
|
398
|
+
|
399
|
+
* @var array
|
400
|
+
|
401
|
+
*/
|
402
|
+
|
403
|
+
protected $middleware = [
|
404
|
+
|
405
|
+
// \App\Http\Middleware\TrustHosts::class,
|
406
|
+
|
407
|
+
\App\Http\Middleware\TrustProxies::class,
|
408
|
+
|
409
|
+
\Fruitcake\Cors\HandleCors::class,
|
410
|
+
|
411
|
+
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
412
|
+
|
413
|
+
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
414
|
+
|
415
|
+
\App\Http\Middleware\TrimStrings::class,
|
416
|
+
|
417
|
+
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
418
|
+
|
419
|
+
];
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
/**
|
424
|
+
|
425
|
+
* The application's route middleware groups.
|
426
|
+
|
427
|
+
*
|
428
|
+
|
429
|
+
* @var array
|
430
|
+
|
431
|
+
*/
|
432
|
+
|
433
|
+
protected $middlewareGroups = [
|
434
|
+
|
435
|
+
'web' => [
|
436
|
+
|
437
|
+
\App\Http\Middleware\EncryptCookies::class,
|
438
|
+
|
439
|
+
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
440
|
+
|
441
|
+
\Illuminate\Session\Middleware\StartSession::class,
|
442
|
+
|
443
|
+
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
444
|
+
|
445
|
+
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
446
|
+
|
447
|
+
\App\Http\Middleware\VerifyCsrfToken::class,
|
448
|
+
|
449
|
+
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
450
|
+
|
451
|
+
\App\Http\Middleware\RequestLogger::class,
|
452
|
+
|
453
|
+
],
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
'api' => [
|
458
|
+
|
459
|
+
'throttle:api',
|
460
|
+
|
461
|
+
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
462
|
+
|
463
|
+
],
|
464
|
+
|
465
|
+
];
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
/**
|
470
|
+
|
471
|
+
* The application's route middleware.
|
472
|
+
|
473
|
+
*
|
474
|
+
|
475
|
+
* These middleware may be assigned to groups or used individually.
|
476
|
+
|
477
|
+
*
|
478
|
+
|
479
|
+
* @var array
|
480
|
+
|
481
|
+
*/
|
482
|
+
|
483
|
+
protected $routeMiddleware = [
|
484
|
+
|
485
|
+
'auth' => \App\Http\Middleware\Authenticate::class,
|
486
|
+
|
487
|
+
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
488
|
+
|
489
|
+
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
490
|
+
|
491
|
+
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
492
|
+
|
493
|
+
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
494
|
+
|
495
|
+
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
496
|
+
|
497
|
+
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
498
|
+
|
499
|
+
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
500
|
+
|
501
|
+
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
502
|
+
|
503
|
+
];
|
504
|
+
|
505
|
+
}
|
506
|
+
|
507
|
+
```
|