Commit graph

9 commits

Author SHA1 Message Date
Oliver Davies e9c2f2a2b0 Replace tightenco/collect with illuminate/collections
Fixes #417
2021-04-23 14:51:51 +01:00
Oliver Davies 661c26dcec Add query condition for status
References #344
2021-01-13 08:52:51 +00:00
Oliver Davies 105405e7f9 Display a list of related post titles
References #3
2021-01-11 01:48:21 +00:00
Oliver Davies 3546ac427a Extract a method to contain the query logic
Group all of the query logic into one method, as this will make it more
readable and this logic is likely to grow.

References #3
2021-01-10 22:38:37 +00:00
Oliver Davies ae0024f335 Return an empty Collection if there are no posts
Return an empty Collection if there are no related posts for the given
post.

References #3
2021-01-10 22:38:37 +00:00
Oliver Davies b90ca42e87 Refactor to use an entity query
Refactor from using `loadByProperties` to using an entity query.

`loadByProperties` doesn't allow for passing multiple values for a
single property such as multiple tags to compare against, and also means
that removing the current node can be done in the query rather than
filtering it out of the Collection.

This might also be a more performant solution if we can do the grouping
and sorting of the results in the query rather than needing to perform
additional steps on the result.

References #3
2021-01-10 22:38:02 +00:00
Oliver Davies d7f3d8c482 Return related posts for a specified blog post
Add the initial code for specifying a blog post and returning related
posts. This includes adding a repository for related posts, and adding
it as a service within the `opdavies_blog` module.

References #3
2021-01-10 22:38:00 +00:00
Oliver Davies 509d526661 Update the Collection namespace 2020-12-17 23:42:20 +00:00
Oliver Davies cbe60209e6 Rename custom module directories
- Rename `opdavies_blog` to `blog`.
- Rename `opdavies_blog_test` to `blog_test`.
- Rename `opdavies_talks` to `talks`.
- Rename `opdavies_talks_test` to `talks_test`.

The files within the directories haven't changed, so there is no
breaking change caused by renaming the directories.

 Please enter the commit message for your changes. Lines starting
2020-09-04 21:25:36 +01:00