9

in my view page I have this route:

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

getting mixed content error How can I get a secure route?

Sid Heart
  • 743
  • 3
  • 14
  • 38

1 Answers1

6

add this to the boot method of your AppServiceProvider. This loads all content over http on local development and https on production

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

and always change your environment to production on production.

Norris Oduro
  • 1,019
  • 8
  • 17