PHP code example of inigo-aldama / inmovilla-api-client-bundle

1. Go to this page and download the library: Download inigo-aldama/inmovilla-api-client-bundle 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/ */

    

inigo-aldama / inmovilla-api-client-bundle example snippets


return [
    // Other bundles...
    Inmovilla\ApiClientBundle\InmovillaApiClientBundle::class => ['all' => true],
];

namespace App\Controller;

use Inmovilla\Repository\CiudadRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

class MyController extends AbstractController
{
    private CiudadRepository $ciudadRepository;

    public function __construct(CiudadRepository $ciudadRepository)
    {
        $this->ciudadRepository = $ciudadRepository;
    }

    public function index()
    {
        $cities = $this->ciudadRepository->findAll();
        // Do something with the cities
    }
}

namespace App\Repository;

use Inmovilla\Repository\PropiedadRepository;

class CustomPropertyRepository extends PropiedadRepository
{
    public function findWithGarage(): array
    {
        return $this->findBy(['garage' => true]);
    }
}