File Structure
Sprnva file structure is tailored to be a MVC framework so that if you step into the massive frameworks like Laravel or CodeIgniter you are familiar with the structure.
SPRNVA/
βββ app/
β   βββ controller/
β   βββ views/
βββ config/
β   βββ routes/
β   βββ function.helpers.php
βββ database/
β   βββ migrations/
β   βββ schema/
βββ public/
β   βββ assets/
β   βββ storage/
β   βββ favicon.ico
βββ vendor/
βββ .gitignore
βββ .htaccess
βββ compose.json
βββ composer.lock
βββ config.example
βββ config.php
βββ index.php
βββ LICENSE
βββ README.mdThe App Directory
App DirectoryThe majority of your application is housed in the app directory. By default, all the logics and the user interface is stored in this directory.
The app directory contains additional directories such as controllers and views.
Controllers Directory
The controllers directory contains the almost all of the logic of your application. Request entering your application will be handled with this directory.
Views Directory
The views directory is the user's perspective of your application. All the graphical representation is placed in this directory.
Always remember in Sprnva Framework, when adding a view it has a naming convention. To declare or add a view just add the name of your view file then add a .view.php convention. This convention will tell the framework to identify that this file is a view file.
The Config Directory
Config DirectoryThe traffic control and the additional helpers is stored in the config directory. By default, routes and function helpers is stored in this directory.
Routes Directory
The routes directory contains all of the route definitions for your application. By default, one route file are included with Sprnva: web.php.
The web.php file contains routes that the user define for the entire application. It is likely that all of your routes will most likely be defined in the web.php file.
Function Helpers
The function.helpers.php is the file where you can add a callable function and later be used in the controllers or in views.
The Database Directory
Database DirectoryThe database directory contains your database migrations and schema. If you wish, you may also use this directory to hold an SQLite database.
Migrations Directory
All of your migration files are stored in the migrations directory. This migration directory is the repository for your database version control. This migration files is the file that contains the schema of your database tables.
Schema Directory
In the migration module, the result of the files generated when using the dump buttons is stored in this directory. This directory contains the .sql file with the schema of your database inside.
The Public Directory
Public DirectoryAll your css, js, images and other plugins are stored in the public directory. By default, public directory has two more directories inside. The assets and the storage directory is where plugins are stored.
Tip: create a new directory when adding a new plugin to segregate the files.
Assets Directory
The storage directory of all the assets of the entire application.
Storage Directory
The recommended directory to store the images of the application.
Last updated