chore: remove unused Blade template validator and cache clearing script to streamline project structure

This commit is contained in:
2025-12-04 08:37:01 -05:00
parent d17da426b3
commit 7b7a112326
2 changed files with 0 additions and 112 deletions

View File

@@ -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

View File

@@ -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!"