Laravel Sample

How this site is laid out

The same folders run on a laptop and on cPanel. Nothing is moved or edited for the server.

public_html/            web root, and the app's root folder
├─ .htaccess            forwards every request into public/, refuses hidden files
├─ .env                 settings and secrets, never reachable
├─ app/  bootstrap/  config/  database/  routes/  storage/  vendor/
└─ public/              the only folder that answers requests
   ├─ .htaccess
   ├─ index.php
   └─ css/

What happens to a request

RequestResult
/aboutForwarded to public/, then Laravel's router
/css/app.cssForwarded to public/css/app.css and served
/.envRefused with 403 before any forwarding