未定义的偏移0 laravel刀片

时间:2015-09-13 22:14:06

标签: laravel laravel-5

我正在使用以下路线

Route::get('admin/new/password','PostController@newPasswordForm');
Route::post('admin/new/password','PostController@newPasswordStore');

和功能就是这样

public function newPasswordForm() {
        return view('pages.posts.password');
    }

并在视图文件中这是代码

@section('content')
<div class="container bg-white">
    <div class="row padding-top-80 padding-bottom-40">
        <div class="col-md-12">
            {!! Form::open(['url' => 'newpassword','method'=>'POST']) !!}

            <div class="col-md-8">
                <h2>Enter Your Password</h2>
                <div class="form-group">
                    {!! Form::label('password', 'Password') !!}
                    {!! Form::password('password') !!}
                </div>
                <div class="form-group">
                    {!! Form::label('confirmpassword', 'Confirm Password') !!}
                    {!! Form::password('password_confirmation') !!}
                </div>


                <div class="clearfix"></div>
                <div class="col-lg-12 text-center">
                    <div id="success"></div>
                    {!! Form::submit('Save', ['class' => 'btn btn-primary btn-large']) !!}

                </div>
            </div>
            {!! Form::close() !!}
        </div>
    </div>
</div>
@endsection

但我收到了以下错误。

ErrorException in FormBuilder.php line 11:
Undefined offset: 0 (View: ..\resources\views\pages\posts\password.blade.php)

我无法理解我做错了什么。请帮帮我.TIA。

0 个答案:

没有答案