PHPackages                             flooris/filemaker-data-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. flooris/filemaker-data-api

ActiveLibrary[API Development](/categories/api)

flooris/filemaker-data-api
==========================

Package to easily access the FileMaker Data API

2.3.0(2y ago)05.8k1[4 issues](https://github.com/flooris/filemaker-data-api/issues)[1 PRs](https://github.com/flooris/filemaker-data-api/pulls)GPL-3.0-or-laterPHPPHP &gt;=8.0

Since Jan 19Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/flooris/filemaker-data-api)[ Packagist](https://packagist.org/packages/flooris/filemaker-data-api)[ Docs](https://github.com/flooris/filemaker-data-api)[ RSS](/packages/flooris-filemaker-data-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (26)Used By (0)

PHP client library for consuming the FileMaker Data API
=======================================================

[](#php-client-library-for-consuming-the-filemaker-data-api)

PHP package (client library) for consuming the FileMaker Data API, with Laravel support.

Install
-------

[](#install)

Via Composer:

```
composer require flooris/filemaker-data-api
```

Basic Usage
-----------

[](#basic-usage)

```
// Include Composer's autoloader.
require_once __DIR__ . '/vendor/autoload.php';

// Define the pagination variables
$offset = 1;
$limit = 100;

// Define the FileMaker Lay-out
$layoutName = 'Products';

// Set up the FileMaker find query
$findQuery = [
    'some_field_name' => 'text to find',
];

// Set up the client.
$client = new \Flooris\FileMakerDataApi\Client();

$result = $client
    ->record($layoutName)
    ->findRecords($findQuery, $offset, $limit)

$totalRecordCount   = $result->dataInfo->totalRecordCount;
$foundCount         = $result->dataInfo->foundCount;
$currentResultCount = $result->dataInfo->returnedCount;

foreach ($result->data as $fmResultObject) {
    $recordId       = $fmResultObject->recordId;
    $modificationId = $fmResultObject->modId;

    $title  = $fmResultObject->fieldData->title;
    $active = (bool)$fmResultObject->fieldData->active;

    $options = $fmResultObject->portalData->options;
}
```

Advanced usage
--------------

[](#advanced-usage)

Define a Model Class for a FileMaker record, for example: `FmBrandObject`. The Model Class should extend `FmBaseObject`.

```
use Flooris\FileMakerDataApi\RecordRepository\FmBaseObject;

class FmBrandObject extends FmBaseObject
{
    public const FM_LAYOUT_NAME = 'php_BRAND';
    public const FM_ID_FIELD_NAME = '_id_brand';

    public function getId(): int
    {
        return $this->getValue(self::FM_ID_FIELD_NAME);
    }

    public function getDataArray(): array
    {
        return [
            'slug'        => $this->getValue('t_slug'),
            'name'        => $this->getValue('t_name'),
            'description' => $this->getValue('t_description'),
            'position'    => (int)$this->getValue('n_sortOrder'),
            'active'      => $this->getValueAsBoolean('t_active'),
        ];
    }

    public function getSupplierId(): int
    {
        return (int)$this->getValue('id_supplier');
    }
}
```

Define a Repository Class, for example: `FmBrandRepository`. The Repository Class should extend `FmBaseRepository`.

The Repository Class mainly defines the Model Class, which also contains the FileMaker Layout name and ID field name.

```
use Flooris\FileMakerDataApi\Client;
use Flooris\FileMakerDataApi\RecordRepository\FmBaseRepository;

class FmBrandRepository extends FmBaseRepository
{
    public function __construct(
        private readonly Client $fmClient
    )
    {
        parent::__construct(
            $this->fmClient,
            FmBrandObject::FM_LAYOUT_NAME,
            FmBrandObject::FM_ID_FIELD_NAME
        );
    }

    public function find(int $id): ?FmBrandObject
    {
        if ($fmDataRecord = $this->findRecordById($id)) {
            return new FmBrandObject($fmDataRecord);
        }

        return null;
    }

    public function each(callable $callback): void
    {
        parent::each(function (\stdClass $fmDataRecord) use ($callback) {
            $callback(new FmBrandObject($fmDataRecord));
        });
    }
}
```

With the Repository it is easy to access records from the FileMaker database table. For example:

```
// Set up the client.
$client = new \Flooris\FileMakerDataApi\Client();

// Initialize the Brand Repository
$brandRepository = new FmBrandRepository($client);

$brandRepository->each(function(FmBrandObject $fmBrandObject) {
    $id         = $fmBrandObject->getId();
    $supplierId = $fmBrandObject->getSupplierId();

    // For example update or create an Eloquent Model like this:
    Brand::query()->updateOrCreate(
        ['id' => $id],
        $fmBrandObject->getDataArray()
    );

    // Or for example update or create an Eloquent Model using a BelongsTo relationship like this:
    Supplier::query()
        ->findOrFail($supplierId)
        ->brands()
        ->updateOrCreate(
            ['id' => $id],
            $fmBrandObject->getDataArray()
        );
})
```

Package improvements
--------------------

[](#package-improvements)

ToDo's:

- Tests
- Custom exceptions
- Fix missing config helper without Laravel, for example in FmBaseObject

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 51.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~53 days

Recently: every ~149 days

Total

18

Last Release

306d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1033813?v=4)[flooris](/maintainers/flooris)[@flooris](https://github.com/flooris)

---

Top Contributors

[![TMBL-DEV](https://avatars.githubusercontent.com/u/43524471?v=4)](https://github.com/TMBL-DEV "TMBL-DEV (21 commits)")[![fkwakkenbos](https://avatars.githubusercontent.com/u/1029218?v=4)](https://github.com/fkwakkenbos "fkwakkenbos (15 commits)")[![JSTLWK](https://avatars.githubusercontent.com/u/14042234?v=4)](https://github.com/JSTLWK "JSTLWK (3 commits)")[![rikzwarthoff](https://avatars.githubusercontent.com/u/9021840?v=4)](https://github.com/rikzwarthoff "rikzwarthoff (1 commits)")[![Tjerk85](https://avatars.githubusercontent.com/u/28298348?v=4)](https://github.com/Tjerk85 "Tjerk85 (1 commits)")

### Embed Badge

![Health badge](/badges/flooris-filemaker-data-api/health.svg)

```
[![Health](https://phpackages.com/badges/flooris-filemaker-data-api/health.svg)](https://phpackages.com/packages/flooris-filemaker-data-api)
```

###  Alternatives

[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[ashallendesign/laravel-exchange-rates

A wrapper package for interacting with the exchangeratesapi.io API.

485677.8k](/packages/ashallendesign-laravel-exchange-rates)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[specialtactics/l5-api

Dependencies for the Laravel API Boilerplate package

3672.8k2](/packages/specialtactics-l5-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
