<?php

namespace PragmaRX\Tracker\Vendor\Laravel\Middlewares;

use Closure;

class Tracker
{
    /**
     * Handle an incoming request.
     *
     * @param \Illuminate\Http\Request $request
     * @param \Closure                 $next
     *
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        app('tracker')->boot();

        return $next($request);
    }
}

<?php

namespace PragmaRX\Tracker\Vendor\Laravel\Middlewares;

use Config;
use Closure;

class Tracker
{
    /**
     * Handle an incoming request.
     *
     * @param \Illuminate\Http\Request $request
     * @param \Closure                 $next
     *
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        if (Config::get('tracker.enabled'))
        {
            app('tracker')->boot();
        }

        return $next($request);
    }
}

Fix tracker disabled state when using middleware
Fix tracker disabled state when using middleware
