0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

パスの変更忘れに注意します

Last updated at Posted at 2020-10-11

ルートをresourceで指定し、いざ実行!してみてもformの内容が送信されなかった。
原因はresource通りのパスに書き換えるのを忘れていたからということで
resource通りのパスに書き換えて完了。

まだこういうことがちょくちょくあるのでなくしたい

web.php
Route::resource("posts",PostController::class);
edit.blade.php
            //posts/createと指定していた
            <form action="./" method="post">
                @csrf
                <p>タイトル</p>
                <p><input size="30" type="text" name="title"></p>
                <p>コンテンツ</p>
                <p><input size="70" type="text" name="content"></p>
                <p><input type="submit"></p>
            </form>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?