Refactor Blog and Page Controllers: Updated BlogController and PageController to utilize the new Blog model and integrated dynamic header and footer templates. Removed the DatabaseSeeder file as it is no longer needed. Enhanced the TemplateService to support dynamic content rendering for both blog and page templates, improving the overall template management system.

This commit is contained in:
Ümit Tunç
2025-11-06 16:49:02 -03:00
parent 920502c5d3
commit 605f0d158f
6 changed files with 355 additions and 75 deletions
+4 -1
View File
@@ -94,7 +94,10 @@ class Blog extends Model
public function scopePublished($query)
{
return $query->where('status', 'published')
->where('published_at', '<=', now());
->where(function($q) {
$q->whereNull('published_at')
->orWhere('published_at', '<=', now());
});
}
public function scopeFeatured($query)