- Tambah accessor getFotoUrlAttribute() di model Kontrakan & Laundry
yang mengecek keberadaan file di disk (menangani casing folder berbeda)
- Inject foto_url di SAWController.sanitizeItemForMobile()
- Semua API response sekarang menyertakan foto_url siap pakai untuk mobile
- Add admin_id FK to kontrakans table
- Add authorization checks to KontrakanController (edit, update, destroy, bulkDestroy)
- Add authorization checks to BookingController (store, bulkDestroy)
- Fix EnsureRole middleware to use auth:admin guard
- Fix booking index stats to filter by admin ownership
- Add model relationships: Admin.kontrakans(), Admin.isSuperAdmin(), Admin.isAdmin()
- Ensure admin biasa sees only their data, super_admin sees all data
- Secure bulk delete operations with per-item admin validation
- Added new super admin account (mikoadmin@gmail.com)
- Fixed User model getRoleLabelAttribute() to handle null role
- Fixed AuthController to refresh user after creation
- Removed rate limiting from register/login endpoints for development
- Added migration to ensure role and phone columns exist
- Updated app config with correct IP (10.192.233.99:8000)
- Fixed API response to include all required fields for Flutter
- Create new 'admins' table with role column (admin/super_admin)
- Create Admin model for admin authentication
- Add AdminSeeder with test data (super_admin, admin)
- Update config/auth.php with dual guards (web for users, admin for admins)
- Update AdminAuthController to use Admin model and 'admin' guard
- Remove role column from users table (users have no role)
- Update register validation messages in Indonesian
- Now same email can be used by user and admin (separate tables)
- Rewrite favorite_service.dart with proper error handling, auth checks, and timeouts
- Add error state UI to favorites_screen.dart with retry button
- Add SnackBar feedback on toggle failures in home/search/detail screens
- Type-safe parsing with per-item error handling to prevent crashes
- Clean orphan favorite records from database
- Add debugPrint logging for troubleshooting
- All changes maintain backward compatibility
Features:
- Laundry: Add jam_buka, jam_tutup, status (buka/tutup) fields to database
- Web forms: Add opening/closing times and status dropdown to create/edit views
- Controller: Validate and save new fields in store() and update()
- Mobile: Parse time strings to remove seconds, display status and hours
- Mobile: Add cache clearing to auto-refresh image data from server
- Mobile: Fix photo priority (prefer 'foto' field over galeri entries)
Changes:
- spk_kontrakan/app/Models/Laundry.php: Update fillable
- spk_kontrakan/app/Http/Controllers/LaundryController.php: Add validation and storage
- spk_kontrakan/resources/views/Laundry/create.blade.php: Add form fields
- spk_kontrakan/resources/views/Laundry/edit.blade.php: Add form fields
- spk_mobile/lib/models/laundry.dart: Time parsing, photo priority fix
- spk_mobile/lib/models/kontrakan.dart: Photo priority fix
- spk_mobile/pubspec.yaml: Add flutter_cache_manager
- Mobile screens: Add cache clearing on data refresh
- Add rate limiting (api:60/min, login:5/min, register:3/hour, saw:30/min)
- Implement centralized JSON error handler for all API exceptions
- Create 6 Form Request classes for input validation
- Fix N+1 query problems with withCount and eager loading
- Add caching for kriteria queries (1 hour cache)
- Create /api/health and /api/docs documentation endpoints
- Fix export system: CSV export instead of Excel (package not installed)
- Restrict CORS to specific origins, set Sanctum token expiration (30 days)
- Add error_code fields to all API responses
- Update pagination views to remove large arrow icons, replace with text buttons
- Fix field name consistency: use correct database columns
- Add SQL injection prevention via sort column whitelist
- Optimize pagination UI for Activity Logs and other pages