Introduction

LaraBooking is an application to manage the bookings/appointments for a business. If you are a business who need an application through which customers can book appointments via phone or at the office you can manage those appointments from an admin panel then this is the app you need. LaraBooking is a complete Appointments Booking system made with Laravel 5.7 and has the following features:

  • Create the clients to book appointments in the available times
  • Create new services those you are provide.
  • Allow the Admins to see and edit all the appointments, services, add new clients, etc
  • View all the booking information in calender(FullCalender).
  • Email notification to the client when booking created.
  • Responsive (Compatible with Desktops and Mobile)
  • Admins can see and edit all the appointments, services, add new providers, etc

If you want, you can see a live preview here: Live Preview - LaraBooking

LaraBooking has an intuitive interface to book new appointments.

elegant icons

And a beautiful dashboard to manage the events...

elegant icons

Requirements

The LaraBooking has a few system requirements : The Laravel framework has a few system requirements. Of course, all of these requirements are satisfied by the Laravel Homestead virtual machine, so it's highly recommended that you use Homestead as your local Laravel development environment.

However, if you are not using Homestead, you will need to make sure your server meets the following requirements:

  1. PHP >= 7.1.3
  2. OpenSSL PHP Extension
  3. PDO PHP Extension
  4. Mbstring PHP Extension
  5. Tokenizer PHP Extension
  6. XML PHP Extension
  7. Ctype PHP Extension
  8. JSON PHP Extension
  9. BCMath PHP Extension
  10. MySQL installed in your system (or your preferred SGBD)
  11. The Composer installed in your system
  12. The Laravel Framework Installer installed in your system

Installing & Running the System

It is super simple to run LaraBooking. First, you need to check if all the Requirements are installed on your system. After it, follow these steps:

1. Create a new Database

Create a new MySQL Database. We recommend that you use utf8 charset in your database. You can create it using the following command, or use your preferred database manager:

CREATE DATABASE larabooking CHARACTER SET utf8 COLLATE utf8_general_ci;

2. Extract the Code

Extract the code in a directory of your preference. Then, navigate to the project folder using the terminal and install all the composer packages with the command below:

composer install

The composer packages installation can take a few minutes. After the installation, inside the project folder, find a file named:

.env.example

Copy all the .env.example file content to a new file named:

.env

OR run below command

copy .env.example .env

Inside this new .env file, change the DATABASE section to use the database you have created in the first step:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=larabooking
DB_USERNAME=your_username
DB_PASSWORD=your_password
                                        

3. Creating the database tables and seeding the data

Now, inside your LaraBooking project folder you can run the commands to create the database tables and seed the test data. If you want to seed the system with all the test data, run the command below:

php artisan migrate --seed

Or, if you want a clean database, use this command:

php artisan migrate

And then, run the following command to create an Admin user (email: admin@admin.com, password: admin@123) on your system:

php artisan db:seed --class=UsersTableSeeder

4. Running the System

Inside your LaraBooking project folder, execute this command to generete de APP_KEY:

php artisan key:generate

And this command to run a server in the http://localhost on the port 8000:

php artisan serve

And then, access http://localhost:8000 to see LaraBooking running.

5. Default Logins

When seed the system data, this will create some default logins:

  • Admin - email: admin@admin.com, password: admin@123

6. Company Details & SMTP Configuration

Befour you will run the system you need to modify SettingsTableSeeder.php(Location: database/seeds) with below code:


<?php 
$compnyInfo = [
   'company_name' => 'Lara Booking', 
   'company_email' => 'companyemail@gmail.com', 
   'email_notification' => '1', 
   'reserved_notification' => '1',
   'reserved_notification_subject'=> 'Booking Reserved Notification'
   'driver' => 'smtp',
   'host' => 'smtp.gmail.com',
   'port' => '587',
   'encryption' => 'tls',
   'username' => 'youremail@gmail.com',
   'password' => 'yourpassword'
   ];
?>
                                            

once successfully done after you will run below command

php artisan db:seed --class=SettingsTableSeeder

7. Create Clients

if you need to add multiple client using factory, run below commaand

php artisan db:seed --class=ClientsTableSeeder

8. Create Services

if you need to add multiple services using factory, run below commaand

php artisan db:seed --class=ServicesTableSeeder

Befour you will run above command and you need to add your company services then you need to moidfy ServicesTableSeeder.php file(Location: database/seeds) with below sample code, duration is a int value of minutes i.e. 1hour for 60 Minutes, after you need to run above command.


<?php 
$servicesInfo = [
    ['name' => "Service Name 1",'duration' => 30,'description' => "Dummy text of the related services"],
    ['name' => "Service Name 2" 'duration' => 30,'description' => "Dummy text of the related services"],
    ['name' => "Service Name 3",'duration' => 30,'description' => "Dummy text of the related services"],
    ['name' => "Service Name 4",'duration' => 30,'description' => "Dummy text of the related services"],
    ['name' => "Service Name 5",'duration' => 30,'description' => "Dummy text of the related services"]
];
?>
                                        


9. Set your Business Hours

Default is adding 10am to 7pm (24Hours Formate), Saturday Sunday is closed by default if you will ok with default business hours then run below command

php artisan db:seed --class=BusinessTableSeeder

If you want to change your business hours then you need to moidfy BusinessTableSeeder.php file(Location: database/seeds) with below sample code, Time formate is 24Hour formated, after you need to run above command.


<?php 
$businessStatus = [
        ['day' => 'Monday', 'time_start' => '10:00:00', 'time_end' => '19:00:00', 'status' => 'OPEN'],
        ['day' => 'Tuesday', 'time_start' => '10:00:00', 'time_end' => '19:00:00', 'status' => 'OPEN'],
        ['day' => 'Thursday', 'time_start' => '10:00:00', 'time_end' => '19:00:00', 'status' => 'OPEN'],
        ['day' => 'Wednesday', 'time_start' => '10:00:00', 'time_end' => '19:00:00', 'status' => 'OPEN'],
        ['day' => 'Friday', 'time_start' => '10:00:00', 'time_end' => '19:00:00', 'status' => 'OPEN'],
        ['day' => 'Saturday', 'time_start' => '10:00:00', 'time_end' => '19:00:00', 'status' => 'CLOSE'],
        ['day' => 'Sunday', 'time_start' => '10:00:00', 'time_end' => '19:00:00', 'status' => 'CLOSE']
];
?>
                                            

Changing the Colors

All the LaraBooking styles are in the public/admin folder and are compiled with Laravel Mix. First, you need to start the Laravel Mix, as we teach in the Building Assets with Mix section. Let's learn how to modify some visual parts of the system.

Change the brand primary color, for the apply diff color you need to change body class like below.

elegant icons
  1. Blue : <body class="skin-blue">
  2. Black : <body class="skin-black">
  3. Purple : <body class="skin-purple">
  4. Green : <body class="skin-green">
  5. Red : <body class="skin-red">
  6. Yellow : <body class="skin-yellow">
  7. Blue Light : <body class="skin-blue-light">
  8. Black Light : <body class="skin-black-light">
  9. Purple Light : <body class="skin-purple-light">
  10. Green Light : <body class="skin-green-light">
  11. Red Light : <body class="skin-red-light">
  12. Yellow Light : <body class="skin-yellow-light">

E-mail Settings

By default, Lara Booking can send e-mails when the client creates a new appointment. This functionality can be enabled in the Settings screen. But to send the e-mails, you need to set the smtp settings or change the e-mail driver in the project settings.

To set a SMTP, open the .env file that you have created when installed the system and change the following lines with your preferred SMTP service settings:

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
                                        
OR

If you can't follow above step then you need to follow Email setting step 6.

We recommend that you create a Mailtrap account to test your e-mails when in development. In production, you can use your preferred SMTP service.

Times Availability

When the client books a new appointment, he can select an available time. This time is calculated verifying if the company works on the selected time (Business Hours) and if the selected provider has available time based on the selected service duration. All the Available Times Logic is inside the BookingsController.php checkBookingAvailability Method

The Company Business Hours can be set on the Settings page, and the Services\BusinessHours.php file manages all the business hours.

elegant icons

Business Logic

By default Business login step 9. but if you need to change your business login you need to modify your provider time.

elegant icons

Business Holidays Manager

We have also business holiday manger module, if your provider have close in working day you need to set as a holiday with date and holiday description. if find booking related date on holiday date then you will got the message with date i.e. we have holiday on 31st Dec due to christmas celebration.

elegant icons