Part 01 - Directory Structure of the Application
Source Code Files of this Chapter project-root/ │── public/ │ └── app/ See the final project directory structure project-root ├── app/ │ ├── Controllers/ │ │ ├── Api/ │ │ │ └── UserController.php │ │ ├── AuthController.php │ │ ├── EmailVerificationController.php │ │ ├── HomeController.php │ │ └── UserController.php │ ├── Core/ │ │ ├── Abstract/ │ │ │ ├── Migration.php │ │ │ ├── Model.php │ │ │…
In this chapter, we will explore the directory structure of the application project. The project-root/folder will contain several subdirectories such as public, app, config, database, and vendor. The App directory will be used to store all project-related classes, following the MVC pattern and employing PSR-4 through Composer for class autoloading.
The public directory will hold the default accessible file of the project, while the config directory will contain various configuration files, including app.php, database.php, and mail.php. Additionally, the project will have a database directory to store migration and seeder files, as well as a vendor directory for third-party dependencies.
To begin, we will create the project-root directory, followed by the public and app subdirectories within it.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.