feat: implement intern blog management system with approval workflows and administrative feedback

This commit is contained in:
Ümit Tunç
2026-07-29 16:18:21 +03:00
parent 7c04433f6d
commit aa003df568
8 changed files with 695 additions and 36 deletions
+8
View File
@@ -23,6 +23,9 @@ class Blog extends Model
'published_at',
'author_id',
'category_id',
'career_application_id',
'intern_category',
'admin_feedback',
'tags',
'view_count',
'is_featured',
@@ -53,6 +56,11 @@ class Blog extends Model
return $this->belongsTo(User::class, 'author_id');
}
public function careerApplication()
{
return $this->belongsTo(CareerApplication::class, 'career_application_id');
}
public function category()
{
return $this->belongsTo(BlogCategory::class, 'category_id');
+8
View File
@@ -48,6 +48,14 @@ class CareerApplication extends Model
return $this->hasMany(InternshipJournalEntry::class);
}
/**
* Get the blog posts written by this intern.
*/
public function blogs()
{
return $this->hasMany(Blog::class, 'career_application_id');
}
protected static function booted()
{
static::saving(function ($model) {