# Auto-Deploy Setup for cPanel

This project is now configured for **upload and extract** hosting.

## What's Already Fixed in This Package

✅ **Asset URLs**: All hardcoded `/assets` paths converted to `{{ asset() }}`  
✅ **Mobile Responsive**: Login pages optimized for mobile  
✅ **Auto Base Path**: Detects subfolder hosting automatically  
✅ **Required Folders**: All Laravel cache/session directories included  
✅ **Clean .htaccess**: Root rewrite configured for `public/` structure  
✅ **No Static HTML**: Removed conflicting `index.html`  

## Upload Instructions

1. **Upload & Extract** the entire project to `public_html`
2. **Set Permissions** (if needed):
   - `storage/` → `775`
   - `storage/framework/` → `775` 
   - `storage/framework/cache/` → `775`
   - `storage/framework/sessions/` → `775`
   - `storage/framework/views/` → `775`
   - `storage/logs/` → `775`
3. **Update .env**:
   ```env
   APP_ENV=production
   APP_DEBUG=false  
   APP_URL=https://yourdomain.com
   ```
4. **Clear Cache** (delete files inside):
   - `bootstrap/cache/` 
   - `storage/framework/cache/data/`
   - `storage/framework/views/`

## URLs After Deploy
- `https://yourdomain.com/` → Homepage
- `https://yourdomain.com/login` → Login page
- `https://yourdomain.com/processing` → Processing page

## Common Issues & Solutions

**500 Error**: Check hosting support for ownership/permissions fix  
**404 Error**: Ensure root `.htaccess` exists and has rewrite rules  
**Cache Error**: Set `storage/` folders to `775` permissions  
**Blade Tags Visible**: Make sure requests go through `public/index.php`  

## Protection Status
- **Local/Dev**: 503 protection bypassed (APP_DEBUG=true)
- **Production**: 503 protection active (APP_DEBUG=false)