PHP code example of wefabric / real-eztat

1. Go to this page and download the library: Download wefabric/real-eztat library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wefabric / real-eztat example snippets


use Wefabric\RealEztat\Services\RealEztatService;

$realEztatService = new RealEztatService();
$objects = $realEztatService->get('api/objects/filter');
foreach ($objects['data'] as $object) {
    echo $object['title'] . "\n";
}

use Wefabric\RealEztat\Endpoints\NewConstructionProject;

$newConstructionProject = new NewConstructionProject();
$projects = $newConstructionProject->get();

foreach ($projects['data'] as $project) {
    echo $project['title'] . "\n";
}

$project = $newConstructionProject->get('slug-of-the-project');

echo $project['title'] . "\n";

REAL_EZTAT_BASE_URL=https://realeztat.nl
REAL_EZTAT_API_KEY=your_api_key_here
REAL_EZTAT_CACHE_TTL=3600 // in seconds