Pharmacy Management System Tutorial

Laravel 12 Project - Pharmacy Management System

Pharmacy Management System – Feature Overview

Dashboard Overview
Visual summary of key pharmacy metrics: users, suppliers, customers, medicines, stock, invoices, and purchases.

Core Modules

User Management
Admin and staff accounts with role-based access control.

Supplier Management
Add, edit, and view supplier profiles; track supplier-related purchases.

Customer Management
Register and manage customer records; view purchase history.

Medicine Inventory
Add and categorize medicines; monitor stock levels and expiry dates.

Stock Control
Track incoming stock and associate stock with suppliers and medicines.

Invoice Management
Generate, view, and print invoices directly from the system.

Purchase Tracking
Record and manage purchase transactions; link purchases to suppliers and stock.

System Settings
Update account details and configure system preferences.

Pharmacy Management System – Installation Guide

System Requirements
Laravel 12 · PHP 8.3+ · MySQL 8.4.3+ · Server: Laragon (recommended) or XAMPP/WAMP


Step 1: Extract Application Folder

Download pharmacy.zip and extract it into your server’s Apache directory.
Laragon: C:\laragon\www\pharmacy
XAMPP: C:\xampp\htdocs\pharmacy


Step 2: Configure Database

Open phpMyAdmin and create a database named pharmacy.
Navigate to pharmacy\database\pharmacy.sql and import the file.
This creates all required tables and sample data.


Step 3: Configure Environment File

Update the .env file with database settings:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=pharmacy
DB_USERNAME=root
DB_PASSWORD=

Enter your MySQL password if set.

Mailtrap (Optional – Email Testing):

MAIL_MAILER=smtp
MAIL_HOST=sandbox.smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=your_mailtrap_username
MAIL_PASSWORD=your_mailtrap_password
MAIL_FROM_ADDRESS="example.email.com"
MAIL_FROM_NAME="${APP_NAME}"


Step 4: Run the Application

Ensure the project is inside the Apache directory, start your server, then access:
Default: http://localhost/pharmacy
Laragon domain (if configured): http://www.pharmacy.com


Step 5: Login Credentials

Email: admin@email.com
Password: 123456


Troubleshooting

Database Connection Failed
Error: SQLSTATE[HY000] [1045] Access denied
Fix: Verify .env credentials, ensure MySQL is running, confirm port 3306.

Blank Page or 404 Error
Cause: Incorrect path or missing dependencies.
Fix: Confirm project location, run composer install, then clear cache:

php artisan config:clear
php artisan cache:clear
php artisan route:clear

Mail Not Sending
Cause: Invalid SMTP credentials.
Fix: Recheck Mailtrap details, confirm port 2525, or test another SMTP provider.

Login Not Working
Cause: Wrong credentials or missing seed data.
Fix: Use default login or re-import pharmacy.sql.

Custom Domain Not Resolving (Laragon)
Cause: Domain not mapped.
Fix: Laragon → Preferences → Apache → Virtual Hosts → add www.pharmacy.com,

restart Laragon.


Installation Complete

You can now log in and start using the Pharmacy Management System.

#Laravel12 #PharmacyManagementSystem #WebDevelopment #LaravelProject

Leave a Reply