![]() |
"Access Denied" error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: "Access Denied" error (/showthread.php?tid=77157) |
"Access Denied" error - emerald - 07-26-2020 Hello everyone. I create a new project with composer on Vagrant/Homestead. If I add a new method in Home Controller I get an error called "Access Denied". Where am I making a mistake? Thanks. RE: "Access Denied" error - mlurie - 07-26-2020 I don't think you can simply return a string the way you are doing. Try echo instead of return and see if it works. Alternatively, you can create a view that simply outputs "Hello" and return that. RE: "Access Denied" error - emerald - 07-27-2020 (07-26-2020, 06:59 PM)mlurie Wrote: I don't think you can simply return a string the way you are doing. Try echo instead of return and see if it works. Alternatively, you can create a view that simply outputs "Hello" and return that. I tried but same result. Project works normally in laragon ![]() RE: "Access Denied" error - mlurie - 07-28-2020 What do your routes look like? Also, it looks like VS Code is flagging your hello() function name for some reason. There might be a naming conflict somewhere. Try changing the name of your method to something else. RE: "Access Denied" error - emerald - 07-29-2020 I solved the problem. Problem fixed after reinstalling Homestead. |