laravel 5.1中RouteCollection.php中的MethodNotAllowedHttpException

laravel 5.1中RouteCollection.php中的MethodNotAllowedHttpException,php,routes,laravel-5.1,Php,Routes,Laravel 5.1,这是代码,我正在处理表单,当我提交表单时,它显示此错误: MethodNotAllowedHttpException在RouteCollection.php第218行 这是我的密码: UserController.php <?php namespace App\Http\Controllers; use App\User; use Illuminate\Http\Request; class UserController extends Controller { pu

这是代码,我正在处理表单,当我提交表单时,它显示此错误:

MethodNotAllowedHttpException在RouteCollection.php第218行

这是我的密码:

UserController.php

    <?php

namespace App\Http\Controllers;

use App\User;
use Illuminate\Http\Request;

class UserController extends Controller
{
    public function postSignUp(Request $request){

        $email=$request['email'];
        $first_name=$request['first_name'];
        $password=bcrypt($request['password']);

        $user= new User();
        $user->email=$email;
        $user->first_name=$first_name;
        $user->password=$password;

        $user->save();
        return redirect()->back();

    }


}

您的表单中有一个输入错误:

mathod="post"
…更改为:

method="post"

由于表单实际上没有定义方法,因此它使用
get
作为默认值。

您的表单中有一个输入错误:

mathod="post"
    <form action="{{ route('signup')}}" mathod="post">
…更改为:

method="post"
由于表单实际上没有得到定义的方法,因此它使用
get
作为默认值。


    <form action="{{ route('signup')}}" mathod="post">
你这里有错误。 应该是:

    <form action="{{ route('signup')}}" method="post">

从方法到方法


你这里有错误。 应该是:

    <form action="{{ route('signup')}}" method="post">


从方法到方法

哦……那是多么愚蠢的错误啊!它正在工作。谢谢你的回答。哦……那是多么愚蠢的错误啊!它正在工作。谢谢你的回答。更正了拼写。它正在工作。感谢您回复.@Md.ShamvilHossain-Np。请随意将其标记为已回答。更正拼写。它正在工作。感谢您回复.@Md.ShamvilHossain-Np。请随意将其标记为已回答。