Adding form action in html in laravel

前端 未结 12 1224
深忆病人
深忆病人 2020-12-29 21:10

I am unable to pass url in views html form action tag.

12条回答
  •  隐瞒了意图╮
    2020-12-29 21:37

    For Laravel 2020. Ok, an example:

    
      @csrf   // !!! attention - this string is a must 
    ....
     
    

    And then in web.php:

    Route::post("/login_kun", "LoginController@login");
    

    And one more in new created LoginController:

     public function login(Request $request){
        dd($request->all());
    }
    

    and you are done my friend.

提交回复
热议问题