src/Currency/Middleware/CurrencyMiddleware.php
public function handle($request, Closure $next)
    {
        // Don't redirect the console
        if (app()->runningInConsole()) {
            return $next($request);
        }

        // Check for a user defined currency
        if (($currency = $this->getUserCurrency($request)) === null) {
            $currency = $this->getDefaultCurrency();
        }

        // Set user currency
        $this->setUserCurrency($currency, $request);

        return $next($request);
    }
public function handle($request, Closure $next)
    {
        // Don't redirect the console
        if (app()->runningInConsole()) {
            return $next($request);
        }

        // Check for a user defined currency
        if (($currency = $this->getUserCurrency($request)) === null) {
            $currency = $this->getDefaultCurrency();
        }

        // Set user currency
        $this->setUserCurrency($currency, $request);

        return $next($request);
    }
Handle an incoming request.

@param  Request $request
@param  Closure $next

@return mixed