Application Structure
To make the most of PHPFast, you should understand its default structure and learn how to customize it to fit your application's needs.
Default Directories
application
ROOT
├── application/ # Application-specific files
│ ├── Blocks/ # UI blocks (footer, header, content)
│ │ ├── Footer/ # Footer block
│ │ ├── Frontend/ # Head block
│ │ │ ├── Header/ # Header block (nav, logo)
│ │ │ ├── Pagination/ # Pagination block
│ │ │ └── Content/ # Content block
│ │ │ ├── Views/ # Content layouts
│ │ │ │ ├── layout_1.php # Layout 1
│ │ │ │ ├── layout_2.php # Layout 2
│ │ │ │ └── layout_3.php # Layout 3
│ │ │ └── ContentBlock.php # Content block logic
│ │ ├── Head/ # Head block (meta, CSS, JS)
│ │ └── Schema/ # Schema block
│ ├── Config/ # Configuration files
│ │ └── Config.php # Main configuration file
│ ├── Controllers/ # Controllers for handling requests
│ │ ├── Api/ # API-related Controllers
│ │ │ └── UsersController.php # Controller for user-related API
│ │ ├── Backend/ # Folder contains controller in bacend
│ │ │ ├── HomeController.php # Controller for home page in backend
│ │ │ └── UsersController.php # Controller for user page in backend
│ │ ├── BackendController.php # Frontnend controller for web requests
│ │ ├── Frontend/ # Folder contains controllers in frontend
│ │ │ ├── HomeController.php # Controller for home page in frontend
│ │ │ └── UsersController.php # Controller for user page in frontend
│ │ └── FrontendController.php # Frontnend controller for web requests
│ ├── Helpers/ # Store collections of standalone functions
│ │ ├── Backend_helper.php # Backend helper functions
│ │ └── Frontend_helper.php # Frontend helper functions
│ ├── Languages/ # Manages multi-language support
│ │ ├── en/ # English version
│ │ │ ├── Home.php/ # Home English version
│ │ │ └── Posts.php/ # Posts Vietnamese version
│ │ └── vi/ # Vietnamese version
│ │ ├── Home.php/ # Home English version
│ │ └── Posts.php/ # Posts Vietnamese version
│ ├── Librabries/ # Managing custom or built-in libraries
│ │ ├── FastLang.php # Handles languages custom
│ │ ├── FastMail.php # Handles mail
│ │ ├── FastToken.php # Handles token
│ │ └── iMagify.php # Handles images
│ ├── Middleware/ # Custom middleware for request handling
│ │ ├── AuthMiddleware.php # Handles authentication
│ │ └── PermissionMiddleware.php # Handles user permissions
│ ├── Models/ # Models for database interactions
│ │ ├── UsersModel.php # Model for interacting with the users table
│ │ └── PostsModel.php # Model for interacting with the posts table
│ ├── Routes/ # Route definitions
│ │ ├── Api.php # API route definitions
│ │ └── Web.php # Web route definitions
│ └── Views/ # Views for frontend and backend
│ ├── default/ # Default theme
│ │ ├── Backend/ # Backend views
│ │ └── Frontend/ # Frontend views (assets, php files)
│ │ ├── Assets/ # Frontend assets (CSS, JS)
│ │ │ ├── css/ # CSS files
│ │ │ └── js/ # JS files
│ │ └── home_index.php # Homepage view
│ └── theme_custom # Custom theme public
system
vendor
writable
Last updated
Was this helpful?