Codeigniter 4 Tutorials
- Codeigniter 4
- Application Run
- Application Structure
- Configuration files
- Errors
- Controller
- View
- Model
- How to remove index.php from URL
- Route
- CodeIgniter URLs
- Helper
- Session
- Global Functions and Constants
- Logging Information in CI4
- Error Handling
- Signin / SignUp
- Login / Register
- CRUD
- Crud 1
- Form Validation
- Data Table
- Pagination
- File Upload
- Show Data Using Ajax
- Select2 AJAX Autocomplete Search
- Curl Post
- Rest API
- Weblink
Home » Codeigniter 4 »
What is Codeigniter 4 Application Structure?
A fresh install has six directories: /app, /system, /public, /writable, /tests and possibly /docs. Each of these directories has a very specific part to play.
The app directory is where all of your application code lives. This comes with a default directory structure
File name : index.php
/app
/Config :- Stores the configuration files
/Controllers :- Controllers determine the program flow
/Database :- Stores the database migrations and seeds files
/Filters :- Stores filter classes that can run before and after controller
/Helpers :- Helpers store collections of standalone functions
/Language :- Multiple language support reads the language strings from here
/Libraries :- Useful classes that don't fit in another category
/Models :- Models work with the database to represent the business entities.
/ThirdParty :- ThirdParty libraries that can be used in application
/Views :- Views make up the HTML that is displayed to the client.
app directory is already namespaced, you should feel free to modify the structure of this directory to suit your application’s needs. For example, you might decide to start using the Repository pattern and Entity Models to work with your data. In this case, you could rename the Models directory to Repositories, and add a new Entities directory.
File name : index.php
File name : index.php
File name : index.php
File name : index.php
File name : index.php
File name : index.php
File name : index.php
File name : index.php