Basic-CRUD-CodeIgniter4
This code is made by @icaluwu,this release is the final release as a template for CRUD (still updates framework as security measures) using CodeIgniter 4 as Framework, Bootstrap as Library, PHP and MySQL. if there's anything wrong with my code you can request to me and give you access to edit my code.
Table of Contents
- Features
- Requirements
- Installation
- Configuration
- Usage
- Contributing
- License
Features
- Create, Read, Update, and Delete records in a MySQL database.
- Simple and responsive UI built with Bootstrap.
- Lightweight and easy to set up.
Requirements
PHP 7.4 or higher
MySQL
XAMPP for local server
Composer for dependency management
Sublime Text recommended text editor
Installation
Step 1: Install XAMPP
Click here XAMPP
Step 2: Install Composer
Click here Composer
Step 3: Set Up CodeIgniter 4
Open TerminalNavigate to `htdocs` in XAMPP
cd /path/to/xampp/htdocs
Create a new `CodeIgniter 4` project using `Composer`
composer create-project codeigniter4/appstarter (any-name)
Step 4: Set Up MySQL Database
- Start
XAMPPand activate the Apache and MySQL modules. - Open
phpMyAdminby navigating to http://localhost/phpmyadmin in your web browser. - Create a new database named
(any-name).
Step 5: Configure CodeIgniter 4
- Open the project in Sublime Text.
- Configure the database settings in .env file located in the root directory
database.default.hostname = localhost
database.default.database = (any-name)
database.default.username = root
database.default.password =
database.default.DBDriver = MySQLi
Step 6: Migrate the Database
- Open your terminal and navigate to the project directory
cd /path/to/xampp/htdocs/(your-folder)
- Run the migrations to set up the database tables
php spark migrate
Usage
- Start XAMPP and activate the Apache and MySQL modules.
- Open your web browser and navigate to http://localhost/(your-folder).
- You should see the homepage of the CRUD application.
Contributing
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (git checkout -b feature/YourFeature).
- Commit your changes (git commit -m 'Add some feature').
- Push to the branch (git push origin feature/YourFeature).
- Open a Pull Request.
License
This project is licensed under the MIT License. See the LICENSE file for details.