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

Fix morphTo to correspond to Laravel 5.6 #310

Merged
merged 2 commits into from
Oct 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Ardent/Ardent.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ public function belongsTo($related, $foreignKey = NULL, $otherKey = NULL, $relat
* @param string $id
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function morphTo($name = null, $type = null, $id = null) {
public function morphTo($name = null, $type = null, $id = null, $ownerKey = null) {
// If no name is provided, we will use the backtrace to get the function name
// since that is most likely the name of the polymorphic interface. We can
// use that to get both the class and foreign key that will be utilized.
Expand Down