=== Testing Marketing Campaigns API Routes === 1. Testing basic route without parameters... Status: 401 ❌ Error: {"message":"Unauthenticated."} 2. Testing with status filter... Status: 401 ❌ Error: {"message":"Unauthenticated."} 3. Testing with sort parameters... Status: 401 ❌ Error: {"message":"Unauthenticated."} 4. Testing with invalid sort field (should be safe)... Status: 401 ✓ Should default to 'created_at' 5. Testing with large limit... Status: 401 ✓ Should cap at 100 6. Testing with negative limit... Status: 401 ✓ Should default to minimum (1) 7. Checking Laravel logs for errors... ✓ No recent errors in log 8. Testing route registration... ✓ Route found: api/marketing/campaigns Methods: GET, HEAD Action: App\Http\Controllers\MarketingController@index Middleware: api, auth:sanctum, permission:marketing.view === All Tests Complete === If all tests passed but you still get 500 errors: 1. Check web server error logs (nginx/apache) 2. Verify authentication token is valid 3. Check if middleware is blocking the request 4. Enable APP_DEBUG=true temporarily to see detailed errors 5. Check for .htaccess or nginx rewrite rules