Skip to content

Commit 27a882d

Browse files
committed
added badges and cache configuration
1 parent 0278898 commit 27a882d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ composer require gearbox-solutions/eloquent-filemaker
6969
# Usage
7070
With the package installed you can now have access to all the features of this package. There are a few different areas to configure.
7171

72+
7273
## Database configuration
7374
The first thing to do is to add a new data connection in your `database.php` config file. The connections you specify here will be used in your FMModel classes to configure which databases each model will connect to.
7475

@@ -98,6 +99,22 @@ It is good practice to create layouts specifically for the Data API to use, rath
9899

99100
As an example, let's say you have three tables - Organizations, Contacts, and Invoices. You may way to create layouts for your web application, such as "dapi-organizations", "dapi-contacts" and "dapi-invoices". If you prefix them all with the same text you can set the prefix value so that you can refer to them as just "organizations", "contacts" and "invoices" in Laravel. If you name your model classes correctly following Laravel's naming guidelines you'll even be able to have the layouts automatically resolve for you and you won't have to enter them manually!
100101

102+
## Laravel Cache Configuration
103+
104+
Eloquent FileMaker will use your app's cache to cache FileMaker Data API session tokens between requests. For this to work, you need to make sure that you are not using your FileMaker connection as your cache driver.
105+
106+
Laravel's default is to use the `database` cache driver. If your FileMaker database connection is also your default driver, you will need to change your cache configuration to something else, such as `file` or `redis`. You can change your cache driver in your `.env`
107+
108+
Laravel 11:
109+
```
110+
cache_store=file
111+
```
112+
113+
Laravel 10 and earlier
114+
```
115+
cache_driver=file
116+
```
117+
101118
## Model Classes
102119
Creating model classes is the easiest way to access your FileMaker data, and is the most Laravel-like way of doing things. Create a new model class and change the extension class from `Model` to `FMModel`. This class change enables you to use the features of this package with your models.
103120

0 commit comments

Comments
 (0)