<?php namespace GeneaLabs\Phpgmaps;

use GeneaLabs\Phpgmaps\Facades\PhpgmapsFacade;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Support\ServiceProvider;

class PhpgmapsServiceProvider extends ServiceProvider
{

    /**
     * Indicates if loading of the provider is deferred.
     *
     * @var bool
     */
    protected $defer = false;

    /**
     * Bootstrap the application events.
     *
     * @return void
     */
    public function boot()
    {
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        $this->app['phpgmaps'] = $this->app->share(function ($app) {
            return new Phpgmaps();
        });
    }

    /**
     * Get the services provided by the provider.
     *
     * @return array
     */
    public function provides()
    {
        return array('phpgmaps');
    }
}

<?php namespace GeneaLabs\Phpgmaps;

use GeneaLabs\Phpgmaps\Facades\PhpgmapsFacade;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Support\ServiceProvider;

class PhpgmapsServiceProvider extends ServiceProvider
{

    /**
     * Indicates if loading of the provider is deferred.
     *
     * @var bool
     */
    protected $defer = false;

    /**
     * Bootstrap the application events.
     *
     * @return void
     */
    public function boot()
    {
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        $this->app['phpgmaps'] = $this->app->share(function ($app) {
            return new Phpgmaps(['http' => $app->make('request')->secure()]);
        });
    }

    /**
     * Get the services provided by the provider.
     *
     * @return array
     */
    public function provides()
    {
        return array('phpgmaps');
    }
}

Set schema (http or https) config setting
Set schema (http or https) config setting