How to implement a template engine in the form of list similar to that used in CMS?

I am currently working on a CMS-like project using Laravel.
there is a template function to be used by the front end. It is similar to the template function implemented by most CMS. Add the following code to the template file to implement the presentation article:

{list categoryid=1 num=5}

{/list}

like the above expression

I think the blade template can customize instructions, and it should be possible to achieve a single-line effect. For example, if I want to display the current time, I can directly set an instruction similar to the following

@datetime

so it can be displayed directly. But similar to the instructions above, how can I make sure that the middle part of the list can be displayed five times?
if the blade template is not suitable for this kind of operation, please recommend a suitable template engine or other ideas.

P.S. Laravel 5.5 + laravel-admin 1

Sep.18,2021
Menu