Laravel collectivehtml 安全路由或 url

Laravel collectivehtml secure route or url

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

{!! 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() !!}

出现混合内容错误如何获得安全路由?

将此添加到 AppServiceProviderboot 方法中。 这会在 local 开发时加载 http 上的所有内容,在 production

上加载 https 上的所有内容
$this->app['request']->server->set('HTTPS', $this->app->environment() != 'local');

并在制作时始终将 environment 更改为 production