How to implement template request function in tp5 and return the name of the requested ID
[Product table]: product
----------------- ------
id | name
1 | PC website
2 | Mobile website
3 | Mini program
-------------- ---------
[Customer table]: client
-------------------------- ---------
id | name | product_id
1 | Customer A | ["1","2","3"]
--------- --------------------------
When rendering data in the "Customer Template" list, how to use "prodect_id" "The ID inside gets the name value corresponding to the ID in the "product" table. If it is ajax, there is a delay in returning the data. I want to get it by calling the function method directly through the template; if there are other better methods, I hope you can tell me
It is recommended to create a custom function directly in common.php to solve the problem