質問編集履歴
2
web.phpの最後の2行削除
title
CHANGED
File without changes
|
body
CHANGED
@@ -49,16 +49,6 @@
|
|
49
49
|
use App\Http\Middleware\HelloMiddleware;
|
50
50
|
|
51
51
|
|
52
|
-
/*
|
53
|
-
|--------------------------------------------------------------------------
|
54
|
-
| Web Routes
|
55
|
-
|--------------------------------------------------------------------------
|
56
|
-
|
|
57
|
-
| Here is where you can register web routes for your application. These
|
58
|
-
| routes are loaded by the RouteServiceProvider within a group which
|
59
|
-
| contains the "web" middleware group. Now create something great!
|
60
|
-
|
|
61
|
-
*/
|
62
52
|
Route::get('/', function () {
|
63
53
|
return view('welcome');
|
64
54
|
});
|
1
web.phpの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -32,4 +32,76 @@
|
|
32
32
|
どこをいじればいいかわかりません。サーバーを起動するとき、プロジェクトlaravelappは
|
33
33
|
関係するのでしょうか?
|
34
34
|
|
35
|
-
とりあえず、解決の糸口を教えていただけますかお願いいたします。
|
35
|
+
とりあえず、解決の糸口を教えていただけますかお願いいたします。
|
36
|
+
|
37
|
+
```php
|
38
|
+
//C:\XAMPP\htdocs\laravelapp\routes\web.php
|
39
|
+
|
40
|
+
|
41
|
+
<?php
|
42
|
+
|
43
|
+
use Illuminate\Support\Facades\Route;
|
44
|
+
use App\Http\controllers\HelloController;
|
45
|
+
use App\Http\controllers\PersonController;
|
46
|
+
use App\Http\controllers\BoardController;
|
47
|
+
use App\http\controllers\RestappController;
|
48
|
+
|
49
|
+
use App\Http\Middleware\HelloMiddleware;
|
50
|
+
|
51
|
+
|
52
|
+
/*
|
53
|
+
|--------------------------------------------------------------------------
|
54
|
+
| Web Routes
|
55
|
+
|--------------------------------------------------------------------------
|
56
|
+
|
|
57
|
+
| Here is where you can register web routes for your application. These
|
58
|
+
| routes are loaded by the RouteServiceProvider within a group which
|
59
|
+
| contains the "web" middleware group. Now create something great!
|
60
|
+
|
|
61
|
+
*/
|
62
|
+
Route::get('/', function () {
|
63
|
+
return view('welcome');
|
64
|
+
});
|
65
|
+
|
66
|
+
|
67
|
+
Route::get('hello', [HelloController::class,'index']);
|
68
|
+
Route::post('hello', [HelloController::class,'post']);
|
69
|
+
|
70
|
+
Route::get('hello/add', [HelloController::class,'add']);
|
71
|
+
Route::post('hello/add', [HelloController::class,'create']);
|
72
|
+
|
73
|
+
Route::get('hello/edit', [HelloController::class,'edit']);
|
74
|
+
Route::post('hello/edit', [HelloController::class,'update']);
|
75
|
+
|
76
|
+
Route::get('hello/del', [HelloController::class,'del']);
|
77
|
+
Route::post('hello/del', [HelloController::class,'remove']);
|
78
|
+
|
79
|
+
Route::get('hello/show', [HelloController::class,'show']);
|
80
|
+
|
81
|
+
Route::get('person', [PersonController::class,'index']);
|
82
|
+
|
83
|
+
Route::get('person/find', [PersonController::class,'find']);
|
84
|
+
Route::post('person/find', [PersonController::class,'search']);
|
85
|
+
|
86
|
+
Route::get('person/add', [PersonController::class,'add']);
|
87
|
+
Route::post('person/add', [PersonController::class,'create']);
|
88
|
+
|
89
|
+
Route::get('person/edit', [PersonController::class,'edit']);
|
90
|
+
Route::post('person/edit', [PersonController::class,'update']);
|
91
|
+
|
92
|
+
Route::get('person/del', [PersonController::class,'delete']);
|
93
|
+
Route::post('person/del', [PersonController::class,'remove']);
|
94
|
+
|
95
|
+
Route::get('board', [BoardController::class,'index']);
|
96
|
+
|
97
|
+
Route::get('board/add', [BoardController::class,'add']);
|
98
|
+
Route::post('board/add', [BoardController::class,'create']);
|
99
|
+
|
100
|
+
Route::resource('rest', [RestappController::class.'index']);
|
101
|
+
Route::resource('rest', [RestappController::class.'show']);
|
102
|
+
// 上の2個はRoute::resource('rest', 'RestappController');を
|
103
|
+
// 編集しなおしたので間違っているかもしれません。
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
```
|