パスワードの判定をして削除、編集の処理を行いたいのですが
inputの値を二つのボタンに渡すことは可能でしょうか
ーーーーーーーーーーーーーーーーーーーーーーーーーーー- /input(パスワード) /削除ボタン/編集ボタン / ーーーーーーーーーーーーーーーーーーーーーーーーーー----
わからないので現状わけて記述しています。
やり方や提案などございましたらご教示くださいよろしくお願いいたします。
//view.php <form method="POST" action="{{ route('posts.update', ['post' => $post]) }}"> @csrf <input name"password" type ="text"> <button name="editbtn">編集</button> </form> <form method="POST" action="{{ route('posts.destroy', ['post' => $post]) }}"> @csrf <input name"password" type ="text"> @method('DELETE') <button name="deletebtn">削除</button> </form>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。