<?php namespace Jenssegers\Agent;

use Illuminate\Support\ServiceProvider;

class AgentServiceProvider extends ServiceProvider {

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

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

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

}

<?php namespace Jenssegers\Agent;

use Illuminate\Support\ServiceProvider;

class AgentServiceProvider extends ServiceProvider {

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

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

    /**
     * Register the service provider.
     */
    public function register()
    {
        $this->app['agent'] = $this->app->share(function ($app)
        {
            return new Agent($app['request']->server->all());
        });
    }

}

Set http headers from laravel request
Set http headers from laravel request

sets the http headers on mobile detect from the laravel request headers,
so headers wont be taken directly from global $_SERVER.
