Skip to content

Commit e9c5ff3

Browse files
author
David Nahodyl
committed
Added documentation about logging out.
1 parent f6fa76d commit e9c5ff3

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Eloquent FileMaker
1+
# Eloquent-FileMaker
22
Eloquent-FileMaker is a PHP package for Laravel to make working with FileMaker databases through the FileMaker Data API easier. The goal of this project is to provide as similar an interface for working with FileMaker records through the Data API as you would get with working with MySQL in native Laravel.
33

44
This package lets you easily connect to your FileMaker database through the Data API and get record data as Laravel Models, with as many native features supported as possible.
@@ -211,7 +211,7 @@ With this package in place the `DB` facade will still work for queries against y
211211

212212
Like the FMModel class and Eloquent builder, the goal is to support the same set of features as the `DB` facade so check out the [Laravel Query Builder Documentation](https://laravel.com/docs/8.x/queries) to see what the basic query builder features are.
213213

214-
### FileMaker-specific Features in the FilMaker Query Builder and FM Facade
214+
### FileMaker-specific Features in the FileMaker Query Builder and FM Facade
215215

216216
In addition to the basic query builder features, the `FMBaseQueryBuilder` class, accessed through the `FM` facade or the FMModel eloquent builder has many new FileMaker-specific methods which are available.
217217

@@ -301,6 +301,21 @@ FM::layout('MyLayoutName')->script('ScriptName')->fieldData($data)->createRecord
301301
302302
```
303303

304+
## Logging out, disconnecting, and ending your Data API session
305+
306+
Eloquent-FileMaker attempts to automatically re-use session tokens by caching the session token between requests. This means that you will see the session remain open in your FileMaker Server admin console. It will be automatically disconnected by your server based on your server or database's disconnection settings.
307+
308+
If you would like to manually log out and end your session you can do so either through the FM facade or through a model.
309+
310+
```
311+
FM::connection()->disconnect();
312+
```
313+
or
314+
```
315+
MyModel::getConnectionResolver()->connection()->disconnect();
316+
```
317+
318+
304319

305320
## Relating Native Laravel models to FMModels
306321
It is possible to have relationships between native Laravel Model objects from your MySQL database and FMModels created from your FileMaker database. To do this, you will need to set up both connections in your `database.config` file and then make sure your models are pointing to the right connection by setting the `$connection` propety in your Model and FMModel classes.

0 commit comments

Comments
 (0)