Hello, I’m new to OctoberCMS and I followed the YouTube video tutorial (https://www.youtube.com/watch?v=_WMH4mlMdjk). I would like to know if, while viewing a post, it is possible to update a certain field (views_count) in Blog\Post only with Tailor, since with the command below, I can search for records in the table:
{% set posts = blog.where('categories_id', 9).get() %}
{% do post.newQuery.update({ view_count: (post.view_count + 1) }) %}
This could be better since you only want to increment the number when the record is viewed on the frontend, rather than every time the record is fetched (model.afterFetch event).