File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
src/Database/Eloquent/Relations Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,11 @@ This package is built and maintained by [Gearbox Solutions](https://gearboxgo.co
25
25
* And more!
26
26
27
27
## 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 )
29
33
30
34
# Installation
31
35
Install ` gearbox-solutions/eloquent-filemaker ` in your project using Composer.
Original file line number Diff line number Diff line change @@ -19,4 +19,11 @@ public function addConstraints()
19
19
}
20
20
}
21
21
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
+
22
29
}
Original file line number Diff line number Diff line change @@ -17,4 +17,11 @@ public function addConstraints()
17
17
$ this ->query ->where ($ this ->foreignKey , '== ' , $ this ->getParentKey ());
18
18
}
19
19
}
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
+ }
20
27
}
You can’t perform that action at this time.
0 commit comments