php - 拉拉维尔 5.3。某些词在发布时导致方法未找到异常
问题描述
method not found exception
我在尝试将这句话发布到控制器时遇到了 laravel
5-6。___ 青霉素是一种用于各种感染的____,是在实验室培养皿中长出一些霉菌后偶然发现的。
我尝试删除句子的一部分,发现只要包含“青霉素”这个词,就会出现错误。
什么可能导致这个问题?
这是我的表格代码。我在 laravel 5.3 中使用 tinymce 插件
<form class="form-horizontal" role="form" method="POST" action="{{url('question/essay/insert') }}">
{{ csrf_field() }}
<div class="row">
<div class="col-xs-12 col-md-12">
<div class="{{ $errors->has('question') ? ' has-error' : '' }}">
<label for="question" class="control-label">Question</label>
<textarea maxlength="50000" rows="10" id="question" type="text-area" class="form-control" name="question" value="{{ old('question') }}" required autofocus> {{ old('question') }} </textarea>
@if ($errors->has('question'))
<span class="help-block">
<strong>{{ $errors->first('question') }}</strong>
</span>
@endif
</div>
<div class="spacer-s"></div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-12">
<div class="action-wrapper">
<button type="submit" class="btn btn-primary">Add</button>
</div>
</div>
</div>
</form>
我的路由代码
Route::post('question/essay/insert','QuestionsController@insertEssayQuestion')->middleware('auth');
解决方案
如果您发布更新路线,您需要在表单中添加 _method 输入。
@method('put')
推荐阅读
- c - 关于pthread和多线程的问题
- javascript - Safai/OSX 上的上下文菜单被打开它的点击关闭
- c# - 如何将`null`转换为可为空的int?我总是得到 0
- android - apksigner - 无效的密钥库格式
- javascript - jQuery Math - 没有空字段的计算
- cordova - 没有为模拟器指定目标 (CORDOVA)
- python - 总结文本文件的内容
- sendgrid - 当它们都是 sendgrid 时如何添加 2 个 DKIM 记录。Klaviyo 和 Sendgrid
- node.js - Mongoose - 如何通过 ObjectId 的“数组”查找?
- c# - 将二维数组分成偶数/奇数二维数组的程序问题(偶数/奇数数组中的额外零)