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:
+4
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user