Nginx正在捕获Laravel请求错误,或者看来

问题描述

我正在Laravel 7.4应用程序的Laravel Valet php7.4环境中工作。这样,我创建了一个表单请求,该表单请求通过以下验证更新了用户的简历: 'bio' => ['nullable','max:255']

每当我输入大量字符时,我的本地(Nginx)服务器似乎都崩溃了,Laravel并没有通过验证抛出错误。我收到了代客502错误网关错误,将其添加到代客配置中进行了修复:

fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;

现在502错误消失了,但不是Laravel捕获请求错误。有什么想法吗?

编辑:有关请求部分的更多信息

表格:

<form
    class="form"
    method="POST"
    action="{{ route('settings.profile.update') }}"
>
    {{ csrf_field() }}
    {{ method_field('PATCH') }}

    <div class="form-group">
        <x-input-textarea
            label="Bio"
            name="bio"
            :value="$user->profile->bio"
            ref="bio"
        />
    </div>
    
    <x-button
        class="button--primary"
        label="Opslaan"
    />
</form>

textarea刀片组件

<div class="form-field">
    @isset( $label )
        <label class="label" for="{{ $name }}">{{ $label }}</label>
    @endif

    <textarea
        {{ $attributes->merge(['class' => "input input--textarea"]) }}
        name="{{ $name }}"
        id="{{ $name }}"
        placeholder="{{ $placeholder ?? ($label ?? null) }}"
        {{ ($required ?? false) ? 'required' : '' }}
        {{ isset($autocomplete) ? 'autocomplete=' . $autocomplete : '' }}
    >{{ old($name,$value ?? '') }}</textarea>

    @if( $errors->has($name) )
        <x-input-message
            :message="$errors->first($name)"
        />
    @elseif( $hint )
        <p class="mt-xxsmall text-meta">
            {{ $hint }}
        </p>
    @endif
</div>

控制器

public function update(ProfileRequest $request)
{
    ...// authorization

    // job
    ProfileUpdateJob::dispatchNow($request,$user);

    ...// returning stuff
}

个人资料更新作业

public function handle()
{
    $input = $this->request->validated();
    $this->user->profile()->update($input);
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...