From 7b7a11232663f4d180ea4dd23a1a98e8a1122b41 Mon Sep 17 00:00:00 2001 From: "Joseph.Rawlings" Date: Thu, 4 Dec 2025 08:37:01 -0500 Subject: [PATCH] chore: remove unused Blade template validator and cache clearing script to streamline project structure --- blade-validator.ps1 | 81 --------------------------------------------- clear-cache.sh | 31 ----------------- 2 files changed, 112 deletions(-) delete mode 100644 blade-validator.ps1 delete mode 100644 clear-cache.sh diff --git a/blade-validator.ps1 b/blade-validator.ps1 deleted file mode 100644 index feb5e3454..000000000 --- a/blade-validator.ps1 +++ /dev/null @@ -1,81 +0,0 @@ -# Blade Template Validator -# Validates that all Blade directives are properly closed - -param( - [string]$FilePath = "themes\lucentui\views\home.blade.php" -) - -Write-Host "=== Blade Template Validator ===" -ForegroundColor Cyan -Write-Host "Analyzing: $FilePath`n" -ForegroundColor Yellow - -$content = Get-Content $FilePath -$stack = @() -$errors = @() -$lineNum = 0 - -foreach ($line in $content) { - $lineNum++ - - # Check for opening directives - if ($line -match '@if\(') { $stack += @{Type='if'; Line=$lineNum} } - if ($line -match '@foreach\(') { $stack += @{Type='foreach'; Line=$lineNum} } - if ($line -match '@for\(') { $stack += @{Type='for'; Line=$lineNum} } - if ($line -match '@while\(') { $stack += @{Type='while'; Line=$lineNum} } - if ($line -match '@guest') { $stack += @{Type='guest'; Line=$lineNum} } - if ($line -match '@auth') { $stack += @{Type='auth'; Line=$lineNum} } - - # Check for closing directives - if ($line -match '^\s*@endif') { - if ($stack.Count -eq 0 -or $stack[-1].Type -ne 'if') { - $errors += "Line $lineNum : @endif without matching @if" - } else { - $stack = $stack[0..($stack.Count-2)] - } - } - if ($line -match '^\s*@endforeach') { - if ($stack.Count -eq 0 -or $stack[-1].Type -ne 'foreach') { - $errors += "Line $lineNum : @endforeach without matching @foreach" - } else { - $stack = $stack[0..($stack.Count-2)] - } - } - if ($line -match '^\s*@endfor') { - if ($stack.Count -eq 0 -or $stack[-1].Type -ne 'for') { - $errors += "Line $lineNum : @endfor without matching @for" - } else { - $stack = $stack[0..($stack.Count-2)] - } - } - if ($line -match '^\s*@endguest') { - if ($stack.Count -eq 0 -or $stack[-1].Type -ne 'guest') { - $errors += "Line $lineNum : @endguest without matching @guest" - } else { - $stack = $stack[0..($stack.Count-2)] - } - } -} - -Write-Host "`n=== Results ===" -ForegroundColor Cyan - -if ($stack.Count -gt 0) { - Write-Host "`nUNCLOSED DIRECTIVES:" -ForegroundColor Red - foreach ($item in $stack) { - Write-Host " Line $($item.Line): @$($item.Type) is not closed!" -ForegroundColor Red - } -} else { - Write-Host "✓ All directives are properly closed" -ForegroundColor Green -} - -if ($errors.Count -gt 0) { - Write-Host "`nERRORS:" -ForegroundColor Red - foreach ($error in $errors) { - Write-Host " $error" -ForegroundColor Red - } -} else { - Write-Host "✓ No structural errors found" -ForegroundColor Green -} - -Write-Host "`n=== Summary ===" -ForegroundColor Cyan -Write-Host "Total lines: $lineNum" -Write-Host "File structure: VALID" -ForegroundColor Green - diff --git a/clear-cache.sh b/clear-cache.sh deleted file mode 100644 index 913284998..000000000 --- a/clear-cache.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# Clear Laravel/Livewire view cache - -echo "=== Clearing Laravel Caches ===" -cd /var/www/paymenter - -echo "1. Clearing view cache..." -php artisan view:clear - -echo "2. Clearing config cache..." -php artisan config:clear - -echo "3. Clearing route cache..." -php artisan route:clear - -echo "4. Clearing application cache..." -php artisan cache:clear - -echo "5. Clearing compiled classes..." -php artisan clear-compiled - -echo "6. Deleting specific compiled view..." -rm -f storage/framework/views/1075fa95e101ea7c85d0b4ca9e4480b3.php - -echo "7. Listing remaining compiled views..." -ls -lh storage/framework/views/ | head -20 - -echo "" -echo "=== Cache Cleared Successfully ===" -echo "Try reloading the homepage now!" -