Releases: gearbox-solutions/eloquent-filemaker
Releases · gearbox-solutions/eloquent-filemaker
2.4.2
2.4.1
This release fixes backwards compatibility with Laravel 10 by checking that Http::createPendingRequest
exists before calling it.
2.4.0
In this release:
- adds the MorphTo Relationship to the FMHasRelationship trait
- The MorphTo relationship class resolves wether to handle the models as FM query or pass it to the default Eloquent Model.
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'])