BowPHP Structure
Overall structure​
BowPHP follows the MVC (Model View Controller) pattern.
| Folder | Description |
|---|---|
| app | Contains the core logic of your application. Almost all of your application's classes will be in this folder |
| frontend | Contains the application's scripts and style files. Among other things, it contains the js, sass, and lang folders. This is where you put your static files and then compile them |
| templates | Contains your application's views |
| config | Contains the various configuration files for the application's components. |
| migrations | Folder in which your application's migrations are saved |
| seeders | Folder in which your application's seedings are saved |
| public | The front controller and the compiled files are stored in this folder. |
| routes | Contains your application's routes |
| var | Contains the folder in which the cache, log, and storage of files uploaded through Bow's Storage system are saved. |
| tests | Contains the application's tests. |
app folder​
This is your working directory in Bow. This is where you put all of your application's files.
Here you will find the following folders:
- Configurations: Folder in which the application's custom configurations are saved.
- Controllers: Folder in which the application's controllers are saved.
- Middlewares: Folder in which the application's middlewares are saved.
- Events: Folder in which the events generated by Bow Console are saved.
- Models: Folder in which the application's models are saved.
- Validations: Folder in which the application's validations are saved.
- Exceptions: Folder in which the application's custom exceptions are saved.
- Services: Folder in which the services generated by Bow Console are saved.
You will also find the following files:
- Kernel.php: The configuration of the application launcher.
frontend folder​
This is where you put all the files that are used in your application's views. You will find the following folders here:
- js: Your
Javascriptfiles are saved here. - sass: Your scss files are saved here.
- lang: Folder in which your application's locales are saved.
See the webpack.mix.js section
migrations and seeders folders​
- migrations: Groups together all of the database migration files.
- seeders: Groups together all of the files used to insert test data into your database.
var folder​
Here, Bow will store the log files and the cache of your application. You will find the following folders here:
- storage: Folder in which the application saves the application's uploaded files
- logs: Folder in which the application's logs are saved.
- session: Folder in which the application's session files are saved.
- cache: Folder in which the application saves the application's caches
- view: Folder in which the application saves the compilation cache of the views
tests folder​
Here, you will store your unit test files. And for the sake of good practice, we have:
- Http: Your Http test files are saved here
- Unity: Your Unity test files go here
Is something missing?
If you run into problems with the documentation or have suggestions to improve the documentation or the project in general, please open an issue for us, or send a tweet mentioning the Twitter account @bowframework or directly on github.