[請益] post上傳請求失敗……

作者: NealPope (尼爾教皇)   2021-07-25 01:43:41
https://i.imgur.com/viKPYZf.jpg
我的網站有顆按鈕要"儲存"
但都請求失敗404...
web.php
https://i.imgur.com/sRcbkE3.jpg
base_modal.blade.php
https://i.imgur.com/NFtQ87L.jpg
然後我只是想按下儲存後先show文字 "儲存新資料"
https://i.imgur.com/crprpIK.jpg
一直顯示
Not Found
The requested URL was not found on this server.
大大們求解...我是剛踏入的新手QQ
作者: bakedgrass (蒙古烤小草)   2021-07-25 03:09:00
你要不要先檢查一下HTML,看看form的action指向哪裡?
作者: youshallnotp (ass)   2021-07-25 04:12:00
應該是form的action沒對到正確的地方Route::post(uri: 'urt',[Controller::class, Controller method])->name( name:url.post');<form action="{{route(url.post)}}" </form>我個人是會先命名route然後這樣呼叫
作者: NealPope (尼爾教皇)   2021-07-25 10:54:00
各位前輩厲害,判斷都正確!謝謝,我基礎尚未扎實抱歉……已解決

Links booklink

Contact Us: admin [ a t ] ucptt.com