Skip to content

Commit a255052

Browse files
Merge branch 'release/1.0.5' into main
2 parents 38ffe8b + ae6cbfc commit a255052

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ This package is built and maintained by [Gearbox Solutions](https://gearboxgo.co
2525
* And more!
2626

2727
## Requirements
28-
Laravel 7.3 or later.
28+
Laravel 9.0+
29+
30+
PHP 8.0+
31+
32+
For Laravel versions greater than 7.3 and less than 9.0, use version [0.2.10](https://github.com/gearbox-solutions/eloquent-filemaker/blob/0.2.10)
2933

3034
# Installation
3135
Install `gearbox-solutions/eloquent-filemaker` in your project using Composer.

src/Database/Eloquent/Relations/HasMany.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,11 @@ public function addConstraints()
1919
}
2020
}
2121

22+
protected function getKeys(array $models, $key = null)
23+
{
24+
return collect($models)->map(function ($value) use ($key) {
25+
return $key ? $value->getAttribute($key) : $value->getKey();
26+
})->values()->filter()->unique(null, true)->sort()->all();
27+
}
28+
2229
}

src/Database/Eloquent/Relations/HasOne.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,11 @@ public function addConstraints()
1717
$this->query->where($this->foreignKey, '==', $this->getParentKey());
1818
}
1919
}
20+
21+
protected function getKeys(array $models, $key = null)
22+
{
23+
return collect($models)->map(function ($value) use ($key) {
24+
return $key ? $value->getAttribute($key) : $value->getKey();
25+
})->values()->filter()->unique(null, true)->sort()->all();
26+
}
2027
}

0 commit comments

Comments
 (0)