feat: add career application support for blog authors and expand blog status workflows

This commit is contained in:
Ümit Tunç
2026-08-07 23:21:17 +03:00
parent 9b91b3c847
commit 32b3f5187d
10 changed files with 75 additions and 23 deletions
+30
View File
@@ -82,6 +82,36 @@ class Blog extends Model
return '/blog/' . $this->slug;
}
public function getAuthorNameAttribute()
{
if ($this->author) {
return $this->author->name;
}
if ($this->careerApplication) {
return $this->careerApplication->name;
}
return __('blog.default_author');
}
public function getAuthorRoleAttribute()
{
if ($this->author && $this->author->role) {
return $this->author->role;
}
if ($this->careerApplication) {
return 'Stajyer Yazılım Geliştirici';
}
return 'Trunçgil Teknoloji Editörü';
}
public function getAuthorAvatarUrlAttribute()
{
if ($this->author && $this->author->avatar) {
return asset('storage/' . $this->author->avatar);
}
return asset('assets/img/avatars/u5.webp');
}
public function getFeaturedImageUrlAttribute()
{
if ($this->featured_image) {