trackstone/laravel-immo-data
Composer 安装命令:
composer require trackstone/laravel-immo-data
包简介
Laravel integration for the Immo Data PHP SDK
README 文档
README
Laravel integration for the Immo Data PHP SDK — French real estate data including property valuation, geocoding, geographic boundaries, and market prices.
Requirements
- PHP 8.3+
- Laravel 11 or 12
Installation
composer require trackstone/laravel-immo-data
The service provider and facade are auto-discovered. No manual registration needed.
Configuration
Add your API key to .env:
IMMO_DATA_API_KEY=your-api-key
Optionally publish the config file:
php artisan vendor:publish --tag=immo-data-config
This creates config/immo-data.php:
return [ 'api_key' => env('IMMO_DATA_API_KEY', ''), 'base_url' => env('IMMO_DATA_BASE_URL', 'https://api.immo-data.fr'), ];
Usage
Via Facade
use ImmoData\Laravel\Facades\ImmoData; use ImmoData\Enums\{RealtyType, GeoLevel, Condition, Dpe}; use ImmoData\Requests\ValuationRequest; // Valuation $request = new ValuationRequest( longitude: 2.3488, latitude: 48.8534, realtyType: RealtyType::Apartment, nbRooms: 3, livingArea: 65.0, condition: Condition::Excellent, dpe: Dpe::C, elevator: true, ); $result = ImmoData::valuation()->estimate($request); echo $result->mainValuation; // 485000.0 // Geocode $results = ImmoData::geocode()->search('Paris', [GeoLevel::City]); echo $results[0]->label; // "Paris, Ile-de-France" // Geographic data $city = ImmoData::geo()->city('75056'); echo $city->cityName; // "Paris" // Market data $price = ImmoData::market()->currentPrice( code: '75', geoLevel: GeoLevel::Department, realtyType: RealtyType::Apartment, ); echo $price->value; // EUR/m²
Via Dependency Injection
use ImmoData\ImmoDataClient; use ImmoData\Enums\RealtyType; use ImmoData\Requests\ValuationRequest; class PropertyController extends Controller { public function __construct( private readonly ImmoDataClient $immoData, ) {} public function estimate() { $request = new ValuationRequest( longitude: 2.3488, latitude: 48.8534, realtyType: RealtyType::Apartment, nbRooms: 3, livingArea: 65.0, ); return $this->immoData->valuation()->estimate($request); } }
Via Service Container
$client = app(ImmoData\ImmoDataClient::class); $result = $client->geocode()->search('Lyon');
Available Methods
| Resource | Method | Description |
|---|---|---|
valuation() |
estimate(ValuationRequest) |
Property price estimation |
geocode() |
search(string, ?GeoLevel[], int) |
Location search |
geo() |
region(string) |
Get region by code |
geo() |
department(string) |
Get department by code |
geo() |
city(string) |
Get city by INSEE code |
geo() |
district(string) |
Get district by code |
geo() |
subdistrict(string) |
Get subdistrict (IRIS) by code |
market() |
priceHistory(string, GeoLevel, RealtyType, ?string, ?string) |
Price history |
market() |
currentPrice(string, GeoLevel, RealtyType) |
Current price per m² |
market() |
saleDurationHistory(string, GeoLevel, ?string, ?string, DurationUnit) |
Sale-duration history |
market() |
currentSaleDuration(string, GeoLevel, DurationUnit) |
Current average sale duration |
transactions() |
search(TransactionsRequest) |
Real estate transactions (DVF) |
dpe() |
search(DpeRequest) |
Search Energy Performance Diagnostics (DPE) |
dpe() |
get(string) |
Get a single DPE by its ADEME number |
For full documentation on request parameters, DTOs, enums, and error handling, see the PHP SDK documentation.
Code Style
This package uses Laravel Pint with the PER Coding Style preset.
# Fix code style composer cs # Check without fixing composer cs:check
Testing
composer test
License
MIT
trackstone/laravel-immo-data 适用场景与选型建议
trackstone/laravel-immo-data 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「laravel」 「france」 「real-estate」 「immobilier」 「trackstone」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 trackstone/laravel-immo-data 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 trackstone/laravel-immo-data 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 trackstone/laravel-immo-data 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Small PHP client library for geo api fr
SDK PHP pour interroger toutes les sources de données RPPS (Répertoire Partagé des Professionnels de Santé) de l'Annuaire Santé - ANS
Small PHP client library for Sirene API
A collection of Value Objects, specific to France.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 29
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-24