首页 > 解决方案 > Laravel 无法提交表单

问题描述

我不知道为什么以及何时发生。当显示提交表单错误时,我的站点中的任何内容Parse error: syntax error, unexpected 'text' (T_STRING), expecting ',' or ')'都可以。在此链接中查看错误:单击提交。我该如何解决

            <form method="post"  action="{{ Route('pay')}}">
            {{ csrf_field() }}
            <input type="hidden" name="offerid" value="1"/>
            <button  type="submit" class="btn btn-primary btn-lg col-lg-12  col-sm-12 col-xs-12" role="button">submit</button>
        </form>

提交所有表单时显示此错误,例如 laravel 登录表单和....

标签: laravelformsredirect

解决方案


您不应更改 VENDOR 文件夹中的任何文件。

回滚您的更改。

或者复制我的默认代码:

$this->setContent(
            sprintf('<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="refresh" content="0;url=%1$s" />

        <title>Redirecting to %1$s</title>
    </head>
    <body>
        Redirecting to <a href="%1$s">%1$s</a>.
    </body>
</html>', htmlspecialchars($url, ENT_QUOTES, 'UTF-8')));

推荐阅读