Create a Room Booking Using Laravel 6

laravel-6-room-booking-dashboard

#1 Download the source code

You can get a copy of the source code here. Use HAPPYENDING to get $20 discount.

#2 Setting up in local development

Extract the zip file into your webserver root directory. I’m using Laragon on my Windows. So I put the room-booking directory inside the www. If you are using XAMPP, most probably the root directory is htdocs.

#3 Install dependencies

Open up a terminal and go into your room-booking directory. Run the command below

composer install

This will download the Laravel 6 and all the required dependencies for the system to run. It may take a while, depending on your internet speed connection.

#4 Setting up the configuration

Create .env file and copy its content from .env.sample. Update the APP setting, DB setting, and EMAIL setting accordingly.

APP_NAME="Booking"
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=https://booking.pisyek

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

MAIL_DRIVER=smtp
MAIL_HOST=localhost
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

#5 Database seeding

You may run the migration and seeding data after setting up your DB configuration. There are seeders for roles, permissions, users, and rooms. You may update the seeders in the database > seeds directory.

That’s it!

Now you may run your web server and access your room-booking via the web browser. It should redirect you to the login page. You may login using the account that you have set up in the users seeder file.