Bus seat booking system created with Laravel 7.
To correctly configure the application, you need to prepare all the following requirements on your development machine:
sync
queue driver)git clone [email protected]:lukaszwoznica/bus-booking-system.git && cd bus-booking-system
composer install
cp .env.example .env
php artisan key:generate
npm install
php artisan migrate:fresh --seed
redis
queue driver).php artisan queue:work redis
php artisan serve
This section describes how to configure environment variables in the .env file. For more detailed information see the official Laravel documentation.
Although Laravel supports various database backends, MySQL is recommended for this project. The application runs some raw SQL queries, therefore errors may arise when using a different database driver. The following environment variables must be properly configured in the .env file.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=my_db
DB_USERNAME=root
DB_PASSWORD=null
By default, Redis is set up as the queue driver. If you want to use the queuing feature for some jobs, you must
configure a connection to the Redis database by setting the variables listed below. Alternatively, you can set the queue
driver to sync
. When using this driver, queued jobs will be executed immediately (synchronously) within the current
process.
QUEUE_CONNECTION=redis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
REDIS_CLIENT=predis
The application has several functionalities related to sending emails, so you need some service to handle them. In a development environment, you can use a test tool such as Mailtrap or MailHog. However, if you want to send real emails, you need to configure some email service. You can use API-based drivers such as Mailgun, Postmark, Amazon SES or any SMTP server. The connection with chosen email service should be configured using the following variables.
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
A working live demo of the Bus Booking System is available here: https://bbs-laravel.herokuapp.com.
The database is automatically refreshed and populated with dummy data every two hours in this demo.
The first load of the website may take a while because the Heroku dyno may be asleep.
You can create a new user account or log in using one of the following credentials:
Role | Password | |
---|---|---|
Admin | [email protected] | BbsAdmin123 |
User | [email protected] | BbsUser123 |