Awesome Open Source
Awesome Open Source

Laravel CRM

Latest Version on Packagist Build Status StyleCI Codacy Badge Total Downloads

This package will add CRM functionality to your laravel projects

⚠️ Warning: This is a pre-release version that is not recommended for production use.

Use Cases

  • Use as a free CRM for your business or your clients
  • Build a custom CRM for your business or your clients
  • Use as an integrated CRM for your Laravel powered business (Saas, E-commerce, etc)
  • Use as a CRM for your Laravel development business
  • Run a multi-tenant CRM Saas business

Features

  • Dashboard
  • Sales leads management
  • Deal management
  • Contact database management
  • Products
  • Users & Teams
  • Secure registration & login
  • Reset forgotten password
  • Laravel Jetstream/Spark teams support
  • Team level roles & permissions

Installation (10-15mins)

Step 1. Install a Laravel project if you don't have one already

https://laravel.com/docs/6.x#installation

Step 2. Make sure you have set up Laravel auth in your project

https://laravel.com/docs/6.x/authentication

Step 3. Install spatie roles & permissions package

https://spatie.be/docs/laravel-permission/v4/installation-laravel

Step 4. Require the current package using composer:

composer require venturedrake/laravel-crm:^0.7

Step 5. Publish the migrations, config & assets

php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="migrations"
php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="config"
php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="assets" --force

Step 6. Update the various config settings in the published config file:

After publishing the package assets a configuration file will be located at config/laravel-crm.php

Please read the comments in this file for each setting. Most can be left as the default, however you will need to update the "CRM Owner" setting to access the CRM initially.

Please note if you set the route_prefix to blank or null you will need to update the default routes/web.php file. All the crm routes are managed by the package, so it should look just as per below after removing the default welcome route and redirecting the default /home route to the dashboard.

Laravel 7 and below:
<?php

use Illuminate\Support\Facades\Route;

Auth::routes();

Route::get('/home', function (){
    return redirect('/');
});
Laravel 8+:
<?php

use Illuminate\Support\Facades\Route;

Route::middleware(['auth:sanctum', 'verified'])->get('/dashboard', function () {
    return view('dashboard');
})->name('dashboard');

Step 7. Run migrations:

php artisan migrate

Step 8. Run database seeder:

php artisan db:seed --class="VentureDrake\LaravelCrm\Database\Seeders\LaravelCrmTablesSeeder"

Step 9. Add the HasCrmAccess, HasCrmTeams & HasRoles traits to your User model(s):

use Illuminate\Foundation\Auth\User as Authenticatable;
use Spatie\Permission\Traits\HasRoles;
use VentureDrake\LaravelCrm\Traits\HasCrmAccess;
use VentureDrake\LaravelCrm\Traits\HasCrmTeams;

class User extends Authenticatable
{
    use HasRoles;
    use HasCrmAccess;
    use HasCrmTeams;

    // ...
}

Step 10. Register at least one user and log in or if you already have a user login with the crm owner you set in step 5

Access the crm to register/login at http://your-project-url/crm

Note if you modified the route_prefix setting from the default the above url will change dependent on that setting.

Upgrade

Upgrading from >= 0.2

Step 1. Run the following to the update migrations and publish assets:

composer require venturedrake/laravel-crm::^0.6
php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="migrations"
php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="assets" --force
php artisan migrate

Step 2. Run the database seeder

php artisan db:seed --class="VentureDrake\LaravelCrm\Database\Seeders\LaravelCrmTablesSeeder"

Upgrading from < 0.2

Step 1. Run the following to the update package:

composer require venturedrake/laravel-crm:^0.6

Step 2. Delete previously published package views located in resources/views/vendor/laravel-crm/*

Step 3. Install and set up spatie roles & permissions package, see install step 3.

Step 4. Add HasCrmAccess, HasCrmTeams & HasRoles traits to App\User model, see installation Step 8.

Step 5. Run the following to the update database and add the default roles/permissions:

php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="migrations"
php artisan vendor:publish --provider="VentureDrake\LaravelCrm\LaravelCrmServiceProvider" --tag="assets" --force
php artisan migrate
php artisan db:seed --class="VentureDrake\LaravelCrm\Database\Seeders\LaravelCrmTablesSeeder"

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Roadmap

  • Products
  • Notes
  • Tasks
  • Files / Documents
  • Calendar (Calls, Meetings, Reminders)
  • Dashboard
  • Custom Fields
  • Activity Feed / Timelines
  • CSV Import / Export

Feedback

Participate in the discord community

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Php (404,845
Laravel (13,236
Management (1,181
Laravel Package (1,065
Crm (498
Contacts (336
Sales (186
Related Projects