Php “如何调试”;MethodNotAllowedHttpException“;在Symfony?

Php “如何调试”;MethodNotAllowedHttpException“;在Symfony?,php,mysql,Php,Mysql,我为我的网站创建了一个带有“添加产品”功能的后端,但是当我添加它时,我没有在表上创建产品,我有这个错误 我有一个错误: Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException No message 我的表格: @extends('admin.layout.admin')) @节(“内容”) 阿吉恩吉·普罗多托 {!!Form::open(['route'=>'product.create','m

我为我的网站创建了一个带有“添加产品”功能的后端,但是当我添加它时,我没有在表上创建产品,我有这个错误

我有一个错误:

Symfony \ Component \ HttpKernel \ Exception \
MethodNotAllowedHttpException
No message
我的表格:

@extends('admin.layout.admin'))
@节(“内容”)
阿吉恩吉·普罗多托
{!!Form::open(['route'=>'product.create','method'=>'post','files'=>true])
{{Form::label('nome','nome')}
{{Form::text('nome',null,array('class'=>'Form control'))}
{{Form::label('descrizione','descrizione')}
{{Form::text('descripione',null,array('class'=>'Form control'))}
{{Form::label('prezzo','prezzo')}
{{Form::text('prezzo',null,array('class'=>'Form control'))}
{{Form::label('category_id','Categoria')}
{Form::select('category_id',[1=>'Flauti'],null,['class'=>'Form control','placeholder'=>'Seleziona Categoria'])}
{{Form::label('image','image')}
{{Form::file('image',array('class'=>'Form control'))}
{{Form::submit('create',array('class'=>'btn btn-->default'))}
{!!Form::close()!!}

@结束部分
请更改表格中的以下行

{!! Form::open(['route'=>'product.create','method'=>'post', 'files'=>true]) !!}


基本上,创建路由是为了在使用资源时显示表单。但是,当您要提交需要提交到.store的表单时,或者如果是编辑表单,请提交到.update route。

欢迎使用Stackoverflow!请试着提供一个答案来回答你的问题。请阅读-总结是,这不是一个解决志愿者问题的理想方式,可能会对获得答案产生反作用。请不要将此添加到您的问题中。但现在我有一个问题:“找不到类'App\Http\Controllers\Product'@Piermuro:如果修复一个错误会导致新的错误,那么您需要进行一些调试。对你来说,做这件事要比别人对一连串错误做出反应容易得多(也快得多)。你能先试试吗?哈迪克也许能帮上忙,但先做些研究——你自己也可以做。
{!! Form::open(['route'=>'product.store','method'=>'post', 'files'=>true]) !!}