- Add package.json dependencies: jquery, jquery-ui, moment, daterangepicker, wavesurfer.js, air-datepicker - Create scripts/setup-vendor.js to copy npm packages to public/assets/vendor - Update view templates to use vendor paths instead of old /js/ or CDN URLs - Clean up legacy commented-out scripts in master layout
31 lines
826 B
PHP
31 lines
826 B
PHP
<?php
|
|
|
|
namespace Spatie\FlareClient\FlareMiddleware;
|
|
|
|
use Closure;
|
|
use Spatie\FlareClient\Report;
|
|
use Spatie\Ignition\Contracts\SolutionProviderRepository;
|
|
|
|
class AddSolutions implements FlareMiddleware
|
|
{
|
|
protected SolutionProviderRepository $solutionProviderRepository;
|
|
|
|
public function __construct(SolutionProviderRepository $solutionProviderRepository)
|
|
{
|
|
$this->solutionProviderRepository = $solutionProviderRepository;
|
|
}
|
|
|
|
public function handle(Report $report, Closure $next)
|
|
{
|
|
if ($throwable = $report->getThrowable()) {
|
|
$solutions = $this->solutionProviderRepository->getSolutionsForThrowable($throwable);
|
|
|
|
foreach ($solutions as $solution) {
|
|
$report->addSolution($solution);
|
|
}
|
|
}
|
|
|
|
return $next($report);
|
|
}
|
|
}
|