From c48db55fb59e21ad70003353863eee0d1e6c325c Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Fri, 11 May 2018 00:31:34 -0400 Subject: [PATCH] Version the blog entry images to bust the cache --- app/Models/Blog.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Blog.php b/app/Models/Blog.php index ebb6cd8..fffb4c3 100644 --- a/app/Models/Blog.php +++ b/app/Models/Blog.php @@ -50,7 +50,7 @@ class Blog extends DashboardModel // Add the header image if one exists $header_image_path = '/uploads/blog/img/' . $blog_entry->id . '-header-image.jpg'; - $blog_entry['headerimage'] = file_exists(base_path() . '/public' . $header_image_path) ? $header_image_path : ''; + $blog_entry['headerimage'] = file_exists(base_path() . '/public' . $header_image_path) ? $header_image_path . '?version=' . $blog_entry->timestamp() : ''; // Add the processed blog entry to the array array_push($blog_entries, $blog_entry);