質問編集履歴
2
追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -41,4 +41,48 @@
|
|
41
41
|
$this->middleware('auth');
|
42
42
|
$this->middleware('auth',['expect'=>'/logout']);
|
43
43
|
}
|
44
|
-
```
|
44
|
+
```
|
45
|
+
default.blade.php
|
46
|
+
```php
|
47
|
+
<!DOCTYPE html>
|
48
|
+
<html lang="ja">
|
49
|
+
<head>
|
50
|
+
<meta charset="utf-8">
|
51
|
+
<title>@yield('title')</title>
|
52
|
+
<link rel="stylesheet" href="/css/style.css">
|
53
|
+
</head>
|
54
|
+
<body>
|
55
|
+
<header>
|
56
|
+
<ul>
|
57
|
+
<li><a href="/">TOP</a></li>
|
58
|
+
<li><a href="/new">新規作成</a></li>
|
59
|
+
<li><a href="/dl">CsvDownload</a></li>
|
60
|
+
<li><a href="{{ route('logout') }}">ログアウト</a></li>
|
61
|
+
</ul>
|
62
|
+
</header>
|
63
|
+
<div class="container">
|
64
|
+
@yield('content')
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
68
|
+
```
|
69
|
+
routes/web.php
|
70
|
+
```php
|
71
|
+
//認証ルート
|
72
|
+
Auth::routes();
|
73
|
+
Route::get('/', 'CustomersController@index');
|
74
|
+
Route::get('/new', 'CustomersController@new');
|
75
|
+
Route::post('/create', 'CustomersController@create');
|
76
|
+
Route::get('/show/{customer}', 'CustomersController@show');
|
77
|
+
Route::get('/edit/{customer}', 'CustomersController@edit');
|
78
|
+
Route::patch('/update/{customer}', 'CustomersController@update');
|
79
|
+
Route::delete('/delete/{customer}', 'CustomersController@delete');
|
80
|
+
Route::get('/search/', 'CustomersController@search');
|
81
|
+
Route::get('/dl/', 'CustomersController@csvDownload');
|
82
|
+
|
83
|
+
Route::get('/hello', 'CustomersController@index');
|
84
|
+
Route::get('/home', 'HomeController@index')->name('home');
|
85
|
+
|
86
|
+
//テストでログアウト登録してみた。
|
87
|
+
Route::get('/logout', 'Auth\AuthController@getLogout');
|
88
|
+
```
|
1
title
CHANGED
File without changes
|
body
CHANGED
@@ -20,6 +20,9 @@
|
|
20
20
|
自分で試せることはやり尽くしてしまったのでご教示頂けると幸いです。
|
21
21
|
|
22
22
|
以下が自作のコントローラの一部です。
|
23
|
+
|
24
|
+
[補足]
|
25
|
+
デフォルトのログイン、ログアウトの画面では問題なくログアウト出来ています
|
23
26
|
```php
|
24
27
|
namespace App\Http\Controllers;
|
25
28
|
|