Proje dosyaları eklendi

This commit is contained in:
2026-08-29 15:53:53 +03:00
commit d3313400ca
440 changed files with 24827 additions and 0 deletions
@@ -0,0 +1,27 @@
<?php
namespace App\Console\Commands;
use App\Serp\Operations\SerpOperationsMetrics;
use Illuminate\Console\Command;
class SerpOperationsSnapshotCommand extends Command
{
protected $signature = 'serp:operations:snapshot {--window=24h} {--json}';
protected $description = 'Scrub edilmiş SERP operasyon özetini gösterir';
public function handle(SerpOperationsMetrics $metrics): int
{
if ($this->option('window') !== '24h') {
$this->error('Desteklenen pencere: 24h');
return self::FAILURE;
}
$data = $metrics->summary() + ['window' => '24h', 'generated_at' => now('UTC')->toAtomString()];
$this->option('json') ? $this->line(json_encode($data, JSON_THROW_ON_ERROR)) : $this->table(['Alan', 'Değer'], collect($data)->except('budget')->map(fn ($v, $k) => [$k, is_scalar($v) || $v === null ? (string) $v : json_encode($v)])->values()->all());
return self::SUCCESS;
}
}