İlk temizlik tamamlandı bir önceki projeden

This commit is contained in:
Ümit Tunç
2026-04-28 21:14:25 +03:00
commit f80443aec0
10000 changed files with 959965 additions and 0 deletions
@@ -0,0 +1,44 @@
<?php
namespace App\Docs\Strategies;
use Knuckles\Scribe\Extracting\Strategies\Strategy;
use Knuckles\Camel\Extraction\ExtractedEndpointData;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
/**
* Custom Scribe Strategy to add admin-ajax endpoints to documentation.
*
* This strategy scans the admin-ajax blade directory and adds
* each endpoint to the API documentation automatically.
*/
class AddEndpointsStrategy extends Strategy
{
/**
* The stage this strategy belongs to.
*/
public string $stage = 'responses';
/**
* Trait this strategy applies to.
*/
public static function routableIf(ExtractedEndpointData $endpoint): bool
{
// Only apply to the dynamic endpoint route
return Str::contains($endpoint->route->uri, 'endpoints/{endpoint}');
}
/**
* @param ExtractedEndpointData $endpointData
* @param array $routeRules
* @return array|null
*/
public function __invoke(ExtractedEndpointData $endpointData, array $routeRules = []): ?array
{
// This strategy doesn't modify responses directly
// The actual endpoint enumeration happens via the Artisan command
return null;
}
}