Skip to content

Commit

Permalink
Use __NAMESPACE__ to concat slug model namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
bosix authored and ifox committed May 9, 2021
1 parent ce2da00 commit 7cbbc25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Models/Behaviors/HasSlug.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ protected static function bootHasSlug()
public function slugs()
{
return $this->hasMany(
config('twill.namespace') . "\Models\Slugs\\" . $this->getSlugClassName()
__NAMESPACE__ . "\Slugs\\" . $this->getSlugClassName()
);
}

public function getSlugClass()
{
$slugClassName = config('twill.namespace') . "\Models\Slugs\\" . $this->getSlugClassName();
$slugClassName = __NAMESPACE__ . "\Slugs\\" . $this->getSlugClassName();
return new $slugClassName;
}

Expand Down

0 comments on commit 7cbbc25

Please sign in to comment.