ikinci temizlik tamamlandı

This commit is contained in:
Ümit Tunç
2026-04-28 21:15:09 +03:00
parent f80443aec0
commit 37e7296527
8313 changed files with 2400677 additions and 0 deletions
@@ -0,0 +1,36 @@
<?php
// Dashboard View Cache Generator
// Bu cron görevi, dashboard blade viewını önbelleğe alır ve storage/app/cache/ dizinine kaydeder
use Illuminate\Support\Facades\Storage;
// Cache klasörünü oluştur (yoksa)
if (!Storage::exists('cache')) {
Storage::makeDirectory('cache');
}
// Önbelleğe alınacak view
$viewPath = 'admin.dashboard.module.dashboard';
$cacheFileName = 'dashboard';
try {
// View içeriğini oluştur
$viewContent = view($viewPath)->render();
// Cache dosyasını kaydet
Storage::put("cache/{$cacheFileName}.blade.php", $viewContent);
// Son güncelleme zamanını kaydet
Storage::put("cache/{$cacheFileName}_last_updated.txt", date('Y-m-d H:i:s'));
echo "{$viewPath} önbelleği başarıyla güncellendi: " . date('Y-m-d H:i:s') . "<br>";
Artisan::call('cache:clear');
Artisan::call('config:clear');
Artisan::call('view:clear');
} catch (\Exception $e) {
echo "{$viewPath} önbelleği güncellenirken hata oluştu: " . $e->getMessage() . "<br>";
}
?>