Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Phrets Laravel Package

troydavisson/phrets

A PHP client for the RETS protocol used by real estate MLS servers, making it simple to authenticate, query listings, download photos, and pull metadata from RETS feeds through a clean, object-oriented API.

Deep Wiki
Context7

PHRETS is a PHP client library for the RETS (Real Estate Transaction Standard) protocol, letting you connect to MLS servers to search, retrieve, and sync real estate listing data. It wraps the protocol's quirks behind a clean, object-oriented API built for PHP 7+.

  • Session management with automatic login and capability discovery
  • Search and query listings using RETS search syntax, with paging support
  • Metadata parsing for resources, classes, and table definitions
  • GetObject downloads for photos and documents
  • Framework integration via a Laravel service provider

Useful for building IDX sites, property syndication, and MLS data pipelines.

Frequently asked questions about Phrets
What is troydavisson/phrets used for?
PHRETS is a PHP client library for connecting to RETS servers and pulling real estate data such as MLS listings, metadata, photos, and documents. It wraps the legacy RETS protocol in an object-oriented API so PHP applications can authenticate, search, and retrieve media without building raw protocol requests. In Laravel, it is best treated as an infrastructure gateway behind your own ListingFeed or MlsGateway interface.
How do I install PHRETS with Composer?
Install it with Composer using composer require troydavisson/phrets in your Laravel project. PHRETS is a plain PHP library, so Laravel will autoload it through Composer without requiring a Laravel-specific package. After installation, verify PHP extensions and pin the package version in composer.json before building your adapter.
Is PHRETS compatible with Laravel?
PHRETS is framework-agnostic and does not provide first-class Laravel support, service providers, or facades. It can run inside Laravel, but you should wrap it in an application-owned adapter and inject that adapter into queued jobs or services. Avoid calling RETS field names directly from controllers or Eloquent models.
Which PHP versions and extensions does PHRETS require?
PHRETS is a PHP library that typically depends on extensions such as curl, XML or DOM, and mbstring, but you should verify the exact requirements for the version you pin. Test on your target PHP version in CI, especially if you are on a newer Laravel release. Also check memory behavior when fetching large MLS result sets.
How do I authenticate with a RETS server and store credentials securely?
PHRETS connects to a RETS login URL using MLS-provided credentials and session handling, but authentication details vary by MLS vendor. Store credentials in Laravel environment variables or a secrets manager, never in source control. Define who owns MLS credentials and vendor escalation before moving beyond a sandbox.
How do I search MLS listings and fetch metadata with PHRETS?
You use PHRETS to log in, discover metadata, and issue RETS search queries against the appropriate classes and resources. Start with one MLS sandbox and prove metadata discovery before building incremental listing queries. Map RETS records into your own Property, Listing, and Media entities instead of leaking RETS field names into the domain.
How do I download listing photos and documents from a RETS server?
PHRETS can request objects such as listing photos and documents from a RETS server, but photo endpoints and limits differ by MLS. Persist media through Laravel Storage or S3 rather than storing binaries in your database. Add completeness checks and retention rules because photo availability and refresh behavior are vendor-specific.
Should I run PHRETS imports in Laravel queues and how do I handle rate limits?
Yes, long-running RETS pulls should run in Laravel queued jobs or scheduled commands, not user-facing requests. Use cache locks, checkpoints, idempotency, retries, and dead-letter handling around the PHRETS adapter. RETS servers are usually batch- or rate-limited, so respect MLS limits and implement backoff rather than scaling workers blindly.
Is PHRETS still maintained and safe for production?
PHRETS has moderate adoption but is community-driven, with no commercial SLA implied and a last release around July 2023. That is not automatically disqualifying, but you should pin the version, monitor package health, and keep a fork-or-patch contingency. Treat MLS-specific fixes, dependency updates, and protocol changes as ongoing ownership costs.
How do I test PHRETS or migrate from RETS to RESO Web API?
Test against an MLS sandbox first and add fixture-based tests around recorded RETS responses so CI does not depend on a live vendor. Keep PHRETS behind an interface so a future RESO Web API implementation can replace it without rewriting domain services. Ask the MLS about its RESO migration timeline and document an exit plan before RETS becomes deeply embedded.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package