%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/loslex/demo/vendor/spatie/laravel-ignition/src/FlareMiddleware/
Upload File :
Create Path :
Current File : /www/loslex/demo/vendor/spatie/laravel-ignition/src/FlareMiddleware/AddContext.php

<?php

namespace Spatie\LaravelIgnition\FlareMiddleware;

use Closure;
use Illuminate\Log\Context\Repository;
use Illuminate\Support\Facades\Context;
use Spatie\FlareClient\FlareMiddleware\FlareMiddleware;
use Spatie\FlareClient\Report;

class AddContext implements FlareMiddleware
{
    public function handle(Report $report, Closure $next)
    {
        if (! class_exists(Repository::class)) {
            return $report;
        }

        $allContext = Context::all();

        if (count($allContext)) {
            $report->group('laravel_context', $allContext);
        }

        return $report;
    }
}

Zerion Mini Shell 1.0