Skip to main content
Glama
ScanBladeTemplatesTool.php1.45 kB
<?php declare(strict_types=1); namespace GoldenPathDigital\LaravelAscend\Tools\Code; use GoldenPathDigital\LaravelAscend\Tools\ProjectAwareTool; final class ScanBladeTemplatesTool extends ProjectAwareTool { public function getName(): string { return 'scan_blade_templates'; } public function getDescription(): string { return 'Review Blade templates for deprecated directives and risky patterns.'; } public function getInputSchema(): array { return $this->buildSchema( $this->baseProjectProperties() ); } public function execute(array $payload): array { $startedAt = microtime(true); $context = $this->createContext($payload); $scanner = $this->createScanner($context); $bladeFiles = $scanner->findByPatterns(['resources/views/**/*.blade.php']); $findings = []; foreach ($bladeFiles as $path) { $evidence = $scanner->findRegexMatches($path, [ '@php', '\{\{\{', '@inject', ]); $findings[] = [ 'file' => $scanner->toRelativePath($path), 'issues' => $evidence, ]; } return $this->success( [ 'templates' => $findings, 'count' => count($findings), ], [], $startedAt ); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aarongrtech/laravel-ascend'

If you have feedback or need assistance with the MCP directory API, please join our Discord server