# Cache Clearing Commands for eSchool Admin

This application provides several ways to clear Laravel caches. Choose the method that best fits your environment:

## Available Scripts

### Windows Batch File
Run the following command in Command Prompt:
```
clear_cache.bat
```

### Bash Script (Linux/Mac or Git Bash on Windows)
Run the following command in terminal:
```
./clear_cache.sh
```

### PHP Script
Run the following command in terminal:
```
php clear_cache.php
```

## Manual Commands

Alternatively, you can run these commands individually:

### Clear Configuration Cache
```
php artisan config:clear
```

### Clear Application Cache
```
php artisan cache:clear
```

### Clear Route Cache
```
php artisan route:clear
```

### Clear View Cache
```
php artisan view:clear
```

### Clear Optimized Classes
```
php artisan optimize:clear
```

### Regenerate Autoloader
```
composer dump-autoload
```

## When to Clear Cache

- After making changes to environment variables (.env file)
- After updating configuration files in the config/ directory
- After adding new routes to routes/ files
- After modifying view files that aren't reflecting changes
- After installing or updating packages via Composer
- When facing unexpected behavior that might be related to cached data

## Laravel Cache Commands Reference

- `php artisan cache:clear` - Clears the application cache
- `php artisan config:clear` - Clears the configuration cache
- `php artisan route:clear` - Clears the route cache
- `php artisan view:clear` - Clears all compiled view files
- `php artisan optimize:clear` - Removes the cached bootstrap files
- `composer dump-autoload` - Regenerates the Composer autoloader