小编nei*_*eil的帖子

只有iFrame中的Laravel 5 TokenMismatchException

我有一份工作表:

    {!! Form::open() !!}
            <div class="form-group">
                <label for="name">Name</label>
                <input type="text" class="form-control" id="name" placeholder="Name">
            </div>
            <div class="form-group">
                <label for="division">Division</label>
                <input type="text" class="form-control" id="division" placeholder="Division">
            </div>
        {!! Form::submit('send', array('class'=>'btn btn-success pull-right')) !!}
    {!! Form::close() !!}
Run Code Online (Sandbox Code Playgroud)

这可以作为提交和存储输入的独立页面.现在我需要将它放在iframe中,以便可以从其他网站调用它.当我这样做时:

<iframe src="http://1.1.1.1/register_user" style="width:600px;height:500px;"></iframe>
Run Code Online (Sandbox Code Playgroud)

表单显示但是当用户提交时,他们会得到以下内容:

TokenMismatchException in VerifyCsrfToken.php line 53:
1. in VerifyCsrfToken.php line 53
2. at VerifyCsrfToken->handle(object(Request), object(Closure))
3. at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
4. at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in ShareErrorsFromSession.php line 54
5. at ShareErrorsFromSession->handle(object(Request), object(Closure))
6. at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in …
Run Code Online (Sandbox Code Playgroud)

iframe laravel

4
推荐指数
1
解决办法
1429
查看次数

标签 统计

iframe ×1

laravel ×1