Here we are going to talk a bit about the built of the Laravel application and how files and folders are sorted.
| /app_root/.env | Very important file, contains all the environment variables and sensitive data necessary to run the app such as MySQL database credentials, Mail server details and AWS details. (should git-ignored) if we plan to share the code online. |
| /app_root/app/ | all Models in the app live directly under this directory |
| /app_root/app/Http/Controllers/ | all Controllers of the app live under this directory |
| /app_root/app/Http/Middleware | this is the home of the URLS traffic guard, to filter out unauthorised requests and throw 403 error |
| /app_root/config/database.php | for DB connection details |
| /app_root/config/filesystems.php | identify services like S3 cloud configuration |
| /approotdirectory/Database/factories/ | to create mock data for testing |
| /approotdirectory/Database/migrations/ | to create tables and columns |
| /approotdirectory/public/ | home of the app for public access |
| /approotdirectory/public/.htaccess | redirect all traffic to index.php |
| /approotdirectory/public/index.php | processing of all traffic starts here |
| /approotdirectory/public/robots.txt | instructions for search engine spiders |
| /approotdirectory/public/css/app.css | compiled .css styling files |
| /approotdirectory/resources/views | all blades (Views) live under this directory |
| /approotdirectory/routes/web.php | for ROUTING traffic from the internet space to controllers in the file system |
| /approotdirectory/storage | the default uploaded files home (within sub-folders) |
| /approotdirectory/storage/logs/laravel.log | Laravel log file to hold errors or whatever we want (ie emails for testing) |