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
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38c02-2c135.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38c02-2c135.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?