質問編集履歴
3
読みやすいように
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
テキストエリアに文字を入力して送信を押すと、どんな文字が入力されたのかテキストエリアの上に表示されるシンプルなformを試しに書いてみたのですが、
|
2
|
-
hi.blade.php内のフォームとroutes.phpはpostでデータを渡すように設定しているだけなのですが、
|
2
|
+
hi.blade.php内のフォームとroutes.phpはpostでデータを渡すように設定しているだけなのですが、
|
3
|
+
http://localhost:8000/hiにアクセスすると
|
3
4
|
MethodNotAllowedHttpException in RouteCollection.php line 218:
|
4
5
|
というエラーが表示されてしまいます。
|
5
6
|
どのようにしたらpostで値の受け渡しができるようになるでしょうか?
|
2
タイトルの変更
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
[
|
1
|
+
[Laravel5.1]ビュー内のformをpostにするとMethodNotAllowedHttpExceptionが起きる
|
body
CHANGED
File without changes
|
1
誤字修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -81,7 +81,7 @@
|
|
81
81
|
<body>
|
82
82
|
<h1>Sample</h1>
|
83
83
|
<p><?php echo $message; ?></p>
|
84
|
-
<form method="post" action="/
|
84
|
+
<form method="post" action="/hi">
|
85
85
|
{{ csrf_field() }}
|
86
86
|
<input type="text" name="str">
|
87
87
|
<input type="submit">
|