darsyn/ip
Laravel package for working with IP addresses: parse and validate IPv4/IPv6, compare and normalize formats, check ranges and subnet/CIDR matches, and convert between representations. Useful for request filtering, geo/security rules, and logging.
if ($request->ip()->isIn('192.168.1.0/24'))).filter_var).Build vs. Buy: Favors "buy" for teams lacking IP expertise or needing quick, maintainable solutions. Avoids tech debt from custom string-based IP logic.
✅ Adopt if:
❌ Look elsewhere if:
For Executives: "This package eliminates IP-related bugs in our Laravel apps—like incorrect rate limiting or fraud detection—by replacing error-prone string logic with a battle-tested library. It’s a 10-minute install that saves dev time and reduces risks from IP mishandling, especially for security-critical features. MIT-licensed and lightweight, it’s a no-brainer for scaling our user-facing services."
For Engineers: *"darsyn/ip gives us IP objects instead of strings, so we can finally:
strpos hacks for subnet validation).192.168.1.1 → 192.168.1.1/32).$ip->isPrivate()->isIn($range) for cleaner code.
Works in Laravel middleware or plain PHP—just composer require darsyn/ip and start using Ip::parse($request->ip())."*For Security/Compliance: *"This standardizes how we handle IPs for:
How can I help you explore Laravel packages today?