Releases: gearbox-solutions/eloquent-filemaker
2.3.2
2.3.1
2.3.0
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');
}
}
2.2.5
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'])
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
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!
- Updates FileMakerConnection class to fire
Illuminate\Database\Events\QueryExecuted
event when making a request to the FIleMaker endpoint, including the session login.