From: Louis Jeckel Date: Thu, 15 Oct 2020 13:45:17 +0000 (+0200) Subject: add url to SocialArticle.php X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=85627b93a3f94416a6722eb948579c5f82792c48;p=psq.git add url to SocialArticle.php --- diff --git a/app/Models/SocialArticle.php b/app/Models/SocialArticle.php index 1d44aaa..e395fca 100644 --- a/app/Models/SocialArticle.php +++ b/app/Models/SocialArticle.php @@ -66,5 +66,11 @@ class SocialArticle extends Model implements PillBoxContract $this->update(['count' => $this->count + 1]); } - + /** + * @return string + */ + public function getUrlAttribute(): string + { + return route('social-article.show', ['slug' => $this->slug]); + } }