gearbox-solutions/eloquent-filemaker
Added Laravel 13 support Removed Laravel 9 support
Fixed issue updated nested field in array/json casted fields.
Fixed Laravel 12 parameter issue for FM grammar constructor
Laravel 12 support.
Added missing support for portal limit and offset on raw FM get queries.
Full Changelog: https://github.com/gearbox-solutions/eloquent-filemaker/compare/2.5.3...2.6.0
Fixed issue with record ID not being passed on FM facade requests.
Added support for passing the modId directly into withModId() on eloquent models.
Fixed inconsistent documentation, fixed name protected $withModId for consistency.
withModId() features to support checking Modification ID when saving eloquent models--filemaker flag for artisan make:model ---filemaker to make new models as FMModel instead of Modelartisan make:modeltoSql and toRawSql to get a string of the JSON query value which would be submitted in the FileMaker Data API requestFlattened bindings for better Telescope compatibility (and probably other things as well).
Fix to prevent mutators from being fired when loading data from FileMaker into a model
This release fixes backwards compatibility with Laravel 10 by checking that Http::createPendingRequest exists before calling it.
In this release:
Changed FileMakerDataApiException to always include the layout name in the error message for easier debugging.
Use Http facade for requests to improve compatibility with Telescope and other frameworks.
This release reworks FMModel's relationship resolution allowing developers to use the model's native relationship methods to connect to other FileMaker Models as well as Models backed by other database drivers. Also, we introduced a new trait that can be used on regular Models to allow proper relationship resolution to FMModels.
Previously you had to this:
// User.php
class User extends Model
{
public function company()
{
// The Company class is an FMModel and is stored in FileMaker
return new \GearboxSolutions\EloquentFileMaker\Database\Eloquent\Relations\BelongsTo(Company::query(), $this, 'company_id', 'id', '');
}
}
Now you can do:
// User.php
use GearboxSolutions\EloquentFileMaker\Database\Eloquent\Concerns\HasHybridRelationships;
class User extends Model
{
use HasHybridRelationships;
public function company()
{
// The Company class is an FMModel and is stored in FileMaker
// The correct relationship will be resolved automatically thanks to the HasHybridRelationships trait
return $this->belongsTo(Company::class, 'company_id', 'id');
}
}
This release fixes an issue where calling a queryScope and then calling where or whereIn causes an extra find request resulting in erroneous data.
Ex:
Model::where('field', 'value')
->myScope()
->whereIn('field', ['value 1', 'value 2'])
Fixed orWhere being dropped when appended after a where.
Changed error throwing to process later instead of in retry, avoiding error with records not found
Adjusted retries so that it will actually attempt more than once.
Removed improper ignoreValidation.
This is a cool update! We've added the QueryExecuted event, which makes FileMaker queries show up in helpful Laravel dev tools like Clockwork. With this, you get a log of each of your queries for each page load, how long they take to execute, and you can see the exact URL, method, and data which was sent to the FileMaker Data API. This makes it easy to do diagnosis of slow-running Data API queries!
Illuminate\Database\Events\QueryExecuted event when making a request to the FIleMaker endpoint, including the session login.Modified retry behavior to better handle FileMaker's Data API returning 502 errors.
Full Changelog: https://github.com/gearbox-solutions/eloquent-filemaker/compare/2.1.0...2.1.1
Added new connection config options for caching session token and converting empty strings to null.
It is recommended to set cache_session_token in your database connection config to true for performance improvements.
Fixed InvalidArgumentException: Illegal operator and value combination. when using Model::where('field', '==', null)
Version 2.0.1
Illuminate\Database\Eloquent\Collection instead of Illuminate\Support\CollectionVersion 2.0 Release!
Run composer require gearbox-solutions/eloquent-filemaker:^2.0 to upgrade to the latest version of the package. Please check the readme for breaking changes.
How can I help you explore Laravel packages today?