New method in frontend controller

frontend is a bit special controller you should not add new methods there

better to use test.php or api.php controller

if you simply want frontend.php, guide attached:

Screenshot_11