質問編集履歴
2
web.phpの最後の2行削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -100,26 +100,6 @@
|
|
100
100
|
|
101
101
|
|
102
102
|
|
103
|
-
/*
|
104
|
-
|
105
|
-
|--------------------------------------------------------------------------
|
106
|
-
|
107
|
-
| Web Routes
|
108
|
-
|
109
|
-
|--------------------------------------------------------------------------
|
110
|
-
|
111
|
-
|
|
112
|
-
|
113
|
-
| Here is where you can register web routes for your application. These
|
114
|
-
|
115
|
-
| routes are loaded by the RouteServiceProvider within a group which
|
116
|
-
|
117
|
-
| contains the "web" middleware group. Now create something great!
|
118
|
-
|
119
|
-
|
|
120
|
-
|
121
|
-
*/
|
122
|
-
|
123
103
|
Route::get('/', function () {
|
124
104
|
|
125
105
|
return view('welcome');
|
1
web.phpの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -67,3 +67,147 @@
|
|
67
67
|
|
68
68
|
|
69
69
|
とりあえず、解決の糸口を教えていただけますかお願いいたします。
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
```php
|
74
|
+
|
75
|
+
//C:\XAMPP\htdocs\laravelapp\routes\web.php
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<?php
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
use Illuminate\Support\Facades\Route;
|
86
|
+
|
87
|
+
use App\Http\controllers\HelloController;
|
88
|
+
|
89
|
+
use App\Http\controllers\PersonController;
|
90
|
+
|
91
|
+
use App\Http\controllers\BoardController;
|
92
|
+
|
93
|
+
use App\http\controllers\RestappController;
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
use App\Http\Middleware\HelloMiddleware;
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
/*
|
104
|
+
|
105
|
+
|--------------------------------------------------------------------------
|
106
|
+
|
107
|
+
| Web Routes
|
108
|
+
|
109
|
+
|--------------------------------------------------------------------------
|
110
|
+
|
111
|
+
|
|
112
|
+
|
113
|
+
| Here is where you can register web routes for your application. These
|
114
|
+
|
115
|
+
| routes are loaded by the RouteServiceProvider within a group which
|
116
|
+
|
117
|
+
| contains the "web" middleware group. Now create something great!
|
118
|
+
|
119
|
+
|
|
120
|
+
|
121
|
+
*/
|
122
|
+
|
123
|
+
Route::get('/', function () {
|
124
|
+
|
125
|
+
return view('welcome');
|
126
|
+
|
127
|
+
});
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
Route::get('hello', [HelloController::class,'index']);
|
134
|
+
|
135
|
+
Route::post('hello', [HelloController::class,'post']);
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
Route::get('hello/add', [HelloController::class,'add']);
|
140
|
+
|
141
|
+
Route::post('hello/add', [HelloController::class,'create']);
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
Route::get('hello/edit', [HelloController::class,'edit']);
|
146
|
+
|
147
|
+
Route::post('hello/edit', [HelloController::class,'update']);
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
Route::get('hello/del', [HelloController::class,'del']);
|
152
|
+
|
153
|
+
Route::post('hello/del', [HelloController::class,'remove']);
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
Route::get('hello/show', [HelloController::class,'show']);
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
Route::get('person', [PersonController::class,'index']);
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
Route::get('person/find', [PersonController::class,'find']);
|
166
|
+
|
167
|
+
Route::post('person/find', [PersonController::class,'search']);
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
Route::get('person/add', [PersonController::class,'add']);
|
172
|
+
|
173
|
+
Route::post('person/add', [PersonController::class,'create']);
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
Route::get('person/edit', [PersonController::class,'edit']);
|
178
|
+
|
179
|
+
Route::post('person/edit', [PersonController::class,'update']);
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
Route::get('person/del', [PersonController::class,'delete']);
|
184
|
+
|
185
|
+
Route::post('person/del', [PersonController::class,'remove']);
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
Route::get('board', [BoardController::class,'index']);
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
Route::get('board/add', [BoardController::class,'add']);
|
194
|
+
|
195
|
+
Route::post('board/add', [BoardController::class,'create']);
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
Route::resource('rest', [RestappController::class.'index']);
|
200
|
+
|
201
|
+
Route::resource('rest', [RestappController::class.'show']);
|
202
|
+
|
203
|
+
// 上の2個はRoute::resource('rest', 'RestappController');を
|
204
|
+
|
205
|
+
// 編集しなおしたので間違っているかもしれません。
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
```
|