This repository contains two PHP projects that have been refactored to implement the MVC (Model-View-Controller) design pattern. The original projects are from PHPGurukul and are:
A web application for managing client information, tracking details, and managing interactions. The original project was built using native PHP and MySQL.
A web-based application designed to manage gym memberships, trainers, and member activities. Originally created with native PHP and MySQL.
- Add, edit, delete, and view client information.
- Manage client interactions and details.
- Simple and intuitive user interface.
- Manage gym memberships and member details.
- Track trainers and their schedules.
- Oversee member activities and gym usage.
Both projects have been refactored to follow the MVC design pattern. The refactored structure separates the code into:
- Models: Handling data and database interactions.
- Views: Managing the presentation layer.
- Controllers: Handling the application logic and user input.
- XAMPP or any compatible local server environment.
- Web browser.
- Basic knowledge of PHP and MySQL.
-
Download and Install XAMPP:
- Download XAMPP from the official website.
- Install XAMPP and start the Apache and MySQL modules from the XAMPP Control Panel.
-
Clone the Repository:
-
Clone this repository to your local machine or download the ZIP file and extract it.
git clone git@github.com:khalidalghifari/MVC-Native-PHP-Kelompok4.git
-
-
Import the Database:
- Open phpMyAdmin by navigating to
http://localhost/phpmyadmin/
. - Create new databases named
clientmsdb
andgymdb
. - Import the SQL files provided in the respective project directories (
clientmsdb.sql
andgymdb.sql
).
- Open phpMyAdmin by navigating to
-
Install Composer
https://getcomposer.org/download/
-
Open terminal and run this following command:
composer install
composer update
If you want to open client-management-system project:
cd Kelompok4-MVC\mvc-client-management-system\public
If you want to open gym-management-system project:
cd Kelompok4-MVC\mvc-gym-management-system\public
php -S localhost:8000
-
Open http://localhost:8000 on your browser:
Each project follows the MVC pattern with the following directory structure:
models/
: Contains all the model classes for database interaction.views/
: Contains all the view files for rendering the user interface.controllers/
: Contains all the controller classes for handling the logic and user input.config/
: Contains configuration files, including database configuration.public/
: Contains publicly accessible files such as index.php and assets (CSS, JS, images).
- Muhammad Raza Adzani (2208107010066)
- Nuri masyithah (2208107010006)
- Fazhira rizky harmayani (2208107010012)
- Muhammad Khalid Al Ghifari (2208107010044)
- Maulana Fikri (2208107010042)
- Muhammad Aufa Zaikra (2208107010070)
This project is licensed under the MIT License. See the LICENSE
file for more details.
- Original projects by PHPGurukul
- MVC implementation inspired by various online PHP MVC tutorials and resources.