Laravel collectivehtml安全路线或网址

Sid*_*art 8 php laravel-5 laravelcollective

在我的视图页面中,我有这条路线:

{!! Form::open(['url' => 'forumcomment/' . $forum->slug, 'files'=>false, 'id' => 'qw-commentform' ,'class' => 'qt-clearfix'])   !!}

        <hr class="qt-spacer-s"><div class="input-field">
        {!! Form::textarea('comment', null, ['class'=>'materialize-textarea', 'id'=>'my-editor', 'required'=>'required','aria-required'=>true]) !!}
        <label for="comment" class="">Comment*</label></div>
        <hr class="qt-spacer-s">
      {!! Form::submit('Post Comment', array( 'class'=>'qt-btn qt-btn-primary qt-btn-xl' )) !!}
    {!! Form::close() !!}
Run Code Online (Sandbox Code Playgroud)

混合内容错误如何获得安全路线?

Nor*_*uro 5

将此添加到boot您的方法中AppServiceProvider.这在加载所有内容httplocal开发和httpsproduction

$this->app['request']->server->set('HTTPS', $this->app->environment() != 'local');
Run Code Online (Sandbox Code Playgroud)

并随时更改您environmentproduction生产.