implementing crm with laravel preparation

Implementing CRM System With Laravel Part 1: Preparation

In this series we will implement a CRM system with laravel. This is a long series so you need to keep track of every part carefully to understand all the basic points.

 

 

Series Topics:

 

Requirements

  • Laravel 5.6 or higher.
  • spatia/laravel-permission package.
  • appzcoder/crud-generator package.

 

What you will learn in this series

  • A basic understanding of the CRM system.
  • A basic understanding of the CRM components.
  • How to use the roles and permissions in laravel and how to utilize this in the CRM system.
  • How to use the crud generator to generate CRM modules.

 

Overview

Basically a CRM (Customer Relationship Managment) is a system that manages the organization relationships and interactions with customers, so the main core component is the customer. The customer in the context of the CRM has a lot of statuses and passes through a cycle of stages in other terms called a pipeline until he becomes the organization loyal customer.

 

Who uses the CRM

  • Sales people
  • Sometimes marketing people

 

CRM Components

1. Contacts

The main component in a typical CRM system is the contacts and it has the following levels:

  • Leads: This is the first stage of the contact, a lead is a contact information of someone that he is looking to purchase a service but may or may not purchase the service.
  • Opportunity: This is the second stage of the contact, opportunity is a qualified lead which has shown some interest to the service you are offering.
  • Customer/won: This is the third stage, a customer/won is the qualified customer and in this stage the contact has taken the decision to surly purchase your service and become the organization loyal customer.
  • Closed: This stage is for failed leads and opportunities as we mentioned is that the lead may not be interested in your service in this case it’s marked as closed.

 

2. Tasks

Tasks is what the required service the customer wants, it must have a status indicator to show that it completes or it’s in progress.

 

3. Documents

This represents any attachments whether images, word documents or pdf files.

 

4. Emails & Messages

The CRM core system must send emails when specific action happen such as when a task is assigned to a user. Also there must be a messages module to enable users to send messages to each other.

 

5. Users

Those are the sales and the sales managers.

 

6. Roles & Permissions

Represents the roles and permissions assigned to each user.

 

7. Calendars

This is a less important component but it’s required in some CRM systems it helps users to monitor their task status by date.

 

Prepare project

Let’s create a new laravel application:

Next install the spatie/laravel-permission, we will use that package for handling roles and permissions:

Open config/app.php and add this line to the providers array:

Publish package config file:

Publish package migrations:

This command will add the migration files for this package.

 

Preparing admin layout

We will use the popular AdminLTE html template as the admin layout, just download it from here.

After downloading the template extract it and then create a new folder called “theme” in the public directory of your laravel project and open the extracted template folder and move these folders “bower_components“, “plugins“, “dist” inside /public/theme directory you just created.

 

Then Create those folders inside resources/views:

  • layout: This will hold the main layout
  • pages: This will hold the admin modules

Add the below files inside resources/views/layout:

resources/views/layout/app.blade.php

resources/views/layout/styles.blade.php

resources/views/layout/header.blade.php

resources/views/layout/sidebar.blade.php

resources/views/layout/footer.blade.php

public/theme/custom.js

Next check that the template is working so let’s create the first page of our admin which is the homepage.

Let’s create a new folder inside resources/views/pages called “home” and inside it add the below file:

resources/views/pages/home/index.blade.php

open routes/web.php and modify it as follows:

Now navigate to http://localhost/crm/public.

 

Continue to part 2: Database

 

Share this: