Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

Commit ef7e412

Browse files
Fix morphTo to correspond to Laravel 5.6
Laravel 5.6 breaks the morphTo function as it no longer fits the definition in Laravel. This is necessary in order to continue to use this package with Laravel 5.6.
1 parent da46877 commit ef7e412

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Ardent/Ardent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ public function belongsTo($related, $foreignKey = NULL, $otherKey = NULL, $relat
448448
* @param string $id
449449
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
450450
*/
451-
public function morphTo($name = null, $type = null, $id = null) {
451+
public function morphTo($name = null, $type = null, $id = null, $ownerKey) {
452452
// If no name is provided, we will use the backtrace to get the function name
453453
// since that is most likely the name of the polymorphic interface. We can
454454
// use that to get both the class and foreign key that will be utilized.

0 commit comments

Comments
 (0)