PHPackages                             idamkiller/fluent-fm - 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. [Database &amp; ORM](/categories/database)
4. /
5. idamkiller/fluent-fm

ActiveLibrary[Database &amp; ORM](/categories/database)

idamkiller/fluent-fm
====================

A PHP package for FileMaker Server's Data API using a fluent query builder style interface.

1.2.10(4y ago)0341MITPHPPHP ^7.2 || ^8.0

Since Oct 22Pushed 4y agoCompare

[ Source](https://github.com/idamkiller/fluent-fm)[ Packagist](https://packagist.org/packages/idamkiller/fluent-fm)[ RSS](/packages/idamkiller-fluent-fm/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (4)Versions (58)Used By (1)

FluentFM [![](https://camo.githubusercontent.com/4db41d1b4746b3c1cd4680e03f2605f1ae434a3b17bc2d69d9a9f090d483fa69/68747470733a2f2f7472617669732d63692e6f72672f746879797070612f666c75656e742d666d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/thyyppa/fluent-fm) [![](https://camo.githubusercontent.com/b4ef1bfcf76979eaca29b9c51608ef288aa74174ae5912e59f4d3898b997fa5e/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3135343137383931382f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/154178918)
==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#fluentfm--)

FluentFM is a PHP package that connects to FileMaker Server's Data API using a fluent query builder style interface.

### Requirements

[](#requirements)

- PHP 7.2+
- FileMaker Server 17

### Installation

[](#installation)

#### Using Composer

[](#using-composer)

Use the command

`composer require thyyppa/fluent-fm`

or include in your `composer.json` file

```
{
    "require": {
        "thyyppa/fluent-fm": "dev-master"
    }
}
```

#### Prepare FileMaker

[](#prepare-filemaker)

**Important! All tables and layouts *must* contain an `id` field.**

If you wish to use soft deletes your table and layout *must* contain the field `deleted_at`

The following fields are also recommended:

- `created_at` (for sorting by latest)
- `updated_at` (for sorting by last update)

All fields that you wish to access must be available in the layout that you provide while performing FileMaker operations through the api.

Ideally these will be hidden layouts that contain all fields raw, mirroring the table, but depending on your layout structure you may be able to use existing human-facing layouts.

[![](./assets/layout_thumbnail.png)](./assets/layout_thumbnail.png)[![](./assets/container_thumbnail.png)](./assets/container_thumbnail.png)[![](./assets/database_thumbnail.png)](./assets/database_thumbnail.png)Ensure that `fmrest` is enabled on your privilege set, which you can define in

`File > Manage > Security > [highlight user] > Privilege Set [Edit]`

[![](./assets/privileges_thumbnail.png)](./assets/privileges_thumbnail.png)

Also be sure that the Data API is enabled on the server.

If your server is installed locally this link should take you there:

Otherwise replace `localhost` with the server address.

[![](./assets/admin_thumbnail.png)](./assets/admin_thumbnail.png)

---

### Usage

[](#usage)

#### Getting records from layout

[](#getting-records-from-layout)

```
