The Fuel Receipts Management System is a simple web application built using the Model-View-Controller (MVC) architecture in vanilla PHP. It allows users to manage fuel receipts, including creating, updating, and deleting entries.
- Using Model-View-Controller (MVC) approach.
- Create, update, and delete fuel receipts.
- Database connectivity using PDO (PHP Data Objects) for MySQL databases
- Model management implemented with automatic management of timestamps.
- View a filtered list of fuel receipts.
-
Clone the Repository: Clone this repository to your local machine using Git (read-only).
git clone https://github.com/Citadaskola-2023/Roberts-Degvielas_ceki.git
-
Development domains: Add development domains to local environment
echo "127.0.0.1 phpmyadmin.fuel.local fuel.local" >> /etc/hosts
-
Set Up Environment Variables: Copy the
.env.example
file to.env
and update the database configuration settings. -
Install Dependencies: Install project dependencies using Composer.
docker run --rm --interactive --tty \ --volume /$PWD:/app \ composer install
-
Start the Development Server: Start the PHP and mysql containers.
docker compose up -d
-
Database Migration: Create the necessary database tables by running migrations.
./migrate.sh
-
Access the Application: Open your web browser and navigate to
https://fuel.local
to access the application.
- Register for a new account or log in if you already have one.
- Once logged in, navigate to the fuel receipts section.
- Create new fuel receipts by providing the necessary details (e.g., license plate, date, odometer reading, etc.).
- View, update, or delete existing fuel receipts as needed.
- Log out when finished.
- Creating Models: Extend the base
Model
class for your models and define table names and field properties as needed. - Defining Routes: Define routes in the
public/index.php
file to map HTTP requests to controller methods. - Implementing Controllers: Create controller files to handle incoming requests, interact with models, and return responses.
- Creating Views: Create view files in the
views
directory to render HTML content.
This project is licensed under the Unlicense - see the LICENSE file for details.