This is a hotel management system where users can search for rooms, book them, and pay using SSLCommerz payment gateway. The system also allows users to book a restaurant, view their invoices, and perform a variety of hotel-related actions. Admins can manage rooms, categories, floors, and view reports such as revenue and total bookings.
- Room Booking: Users can book rooms based on the check-in and check-out date, number of guests (adults and children), and the preferred floor.
- Payment System: Integrated SSLCommerz payment gateway for room bookings with cash or online payment options.
- Invoice Generation: After successful payment, users can download the invoice in PDF format using the html2pdf package.
- Sending Email Notification: After successful payment, users can read an instant email to about booking information using mailtrap.
- Restaurant Booking: Users can book a table in the restaurant by entering their name, email, phone number, number of guests, and the desired date/time.
- Admin Panel: Admins can view detailed reports of room bookings, transactions, and revenue. Charts such as area charts and line charts are used to show booking and revenue data.
- Role-Based Permissions: Admins can manage user roles and permissions using the spatie/laravel-permission package.
- Data Import/Export: Admins can import/export data using CSV files with the maatwebsite/excel package.
- Authentication: User authentication is handled by Laravel Breeze, and Vue.js is used for the frontend.
git clone https://github.com/Shareiar-shams/HManagement.git
composer install
Navigate to the frontend directory and run:
npm install
Copy .env.example to .env and update the environment variables such as database credentials, payment gateway settings, etc.
cp .env.example .env
php artisan key:generate
php artisan config:clear
php artisan cache:clear
php artisan config:cache
php artisan migrate
php artisan stroage:link
php artisan serve
npm run dev
This project includes a scheduled command to automatically update the status of bookings where the checkout date has passed.
Command: bookings:update-status
Functionality:
- This command checks the
ordersdatabase table for bookings where thecheckoutdate is earlier than the current date. - It then updates the status of those bookings as needed (e.g., marking them as "completed" or "expired").
Scheduled Execution:
-
The command is scheduled to run daily using Laravel's task scheduler:
Schedule::command('bookings:update-status')->daily();
Manual Execution:
-
To run this command manually from the terminal, use the following
artisancommand:php artisan bookings:update-status
-
This is useful for testing or for manually triggering the update outside of the scheduled time.
- Frontend: The Vue.js frontend interacts with the Laravel backend through API endpoints.
- Admin Panel: Admin users can log in and manage the hotel data such as room management, transaction reports, and revenue charts.
your_domain/admin/login (in local use localhost::8000/admin/login)
To access the Admin Panel, visit the following URL:
- **Email:** admin@example.com
- **Password:** shareiar
Feel free to contribute to this project by submitting issues or pull requests. Follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Commit changes and push to the branch.
- Open a pull request.
For any queries or support, feel free to contact [islamshareiar@gmail.com].