Skip to content

Commit 456e476

Browse files
author
Kurt Friars
committed
Use the configured hyperlink model in the IsLinkable trait
1 parent b56cd73 commit 456e476

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Concerns/IsLinkable.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
namespace Plank\Frontdesk\Concerns;
44

55
use Illuminate\Database\Eloquent\Relations\MorphMany;
6-
use Plank\Frontdesk\Models\Hyperlink;
6+
use Plank\Frontdesk\Contracts\LinksToContent;
77

88
/**
99
* @mixin \Illuminate\Database\Eloquent\Model
1010
*
11-
* @property-read \Illuminate\Database\Eloquent\Collection<Hyperlink> $hyperlinks
11+
* @property-read \Illuminate\Database\Eloquent\Collection<LinksToContent> $hyperlinks
1212
*/
1313
trait IsLinkable
1414
{
1515
public function hyperlinks(): MorphMany
1616
{
17-
return $this->morphMany(Hyperlink::class, 'linkable');
17+
return $this->morphMany(config('frontdesk.models.hyperlink'), 'linkable');
1818
}
1919
}

0 commit comments

Comments
 (0)