Skip to content
Advertisement

How to Keep a Simple PHP application Inside a Laravel Application? [closed]

I have a Laravel Application hosted on example.com but I need to keep another simple PHP application (Named API) in that directory also such as example.com/api, but when I want to browse the example.com/api it gave me not found error. What I have to do to sort it out. enter image description here

Advertisement

Answer

The public directory is the document root of the web server. That is why you cannot access the api directory.

Place the api directory inside public. Be careful to protect any sensitive files.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement