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

For frontend example you can use simple controllers

\application\controllers\test.php

\application\controllers\fquick.php

For admin controllers, there are security mechanism, you need allow access for specific user type:

index

In file: \application\libraries\Admin_Controller.php

So by example add controller name for admin or other user type access