|
@@ -51,7 +51,7 @@ discard block |
|
|
block discarded – undo |
|
51
|
51
|
$searchResults = Post::where('title', 'LIKE', '%'.$request->get('s').'%')->limit(100)->get(); |
|
52
|
52
|
|
|
53
|
53
|
// Map it so the post is actually accessible with ->indexable, for backwards compatibility in old view files. |
|
54
|
|
- $searchResultsMappedWithIndexable = $searchResults->map(function (Post $post) { |
|
|
54
|
+ $searchResultsMappedWithIndexable = $searchResults->map(function(Post $post) { |
|
55
|
55
|
return new class($post) { |
|
56
|
56
|
public $indexable; |
|
57
|
57
|
|
|
@@ -63,7 +63,7 @@ discard block |
|
|
block discarded – undo |
|
63
|
63
|
}); |
|
64
|
64
|
|
|
65
|
65
|
return view('blogetc::search', [ |
|
66
|
|
- 'title' => 'Search results for ' . e($request->searchQuery()), |
|
|
66
|
+ 'title' => 'Search results for '.e($request->searchQuery()), |
|
67
|
67
|
'query' => $request->searchQuery(), |
|
68
|
68
|
'search_results' => $searchResultsMappedWithIndexable, |
|
69
|
69
|
]); |
|
@@ -110,7 +110,7 @@ discard block |
|
|
block discarded – undo |
|
110
|
110
|
$categoryID = $category->id; |
|
111
|
111
|
|
|
112
|
112
|
// TODO - make configurable |
|
113
|
|
- $title = config('blogetc.blog_index_category_title', 'Viewing blog posts in ') . $category->category_name; |
|
|
113
|
+ $title = config('blogetc.blog_index_category_title', 'Viewing blog posts in ').$category->category_name; |
|
114
|
114
|
} |
|
115
|
115
|
|
|
116
|
116
|
$posts = $this->postsService->indexPaginated(config('blogetc.per_page'), $categoryID); |