Git Product home page Git Product logo

multi-tenant-laravel-saas-boilerplate's Introduction

Multi-tenant Laravel SaaS boilerplate

This repository puts together the most common building blocks necessary for developing a multi tenant SAAS application using Laravel, thus enabling users to jumpstart their SAAS application development with separate tenant databases.

It provides

  • Register Page for new project with New Domain.
  • Multi tenancy with separate databases

Getting Started

This starter boilerplate is built on Laravel 6.2. Hence, working knowledge of Laravel is required.

Installing

  • Download the repository by cloning it or in zip format & extract to your project folder
  • Run 'composer install' to install the packages used in this project.
composer install     
  • Copy .env.example to .env & update the necessary parameters.
  • Change your domain in .env CENTRAL_DOMAIN = example.com and add domain in config/tenancy.php in array of exempt_domains which is your main(central) domain.

Package

  • "stancl/tenancy": "^2.3"

Tenancy for Laravel

Documentation

Server Setup

Setup domain with your project with creating virtual host.


Create Virtual Host step by step



Note : cPanel it will not work as it will create dynamic database.

You have to add *. in ServerAlias to support dynamic subdomains.

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName example.com
    ServerAlias *.example.com
    VirtualDocumentRoot /var/www/example.com/public
    DocumentRoot /var/www/example.com/public
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

License

This project is free for anyone who wishes to copy and replicate / customize for their needs as long as they adhere to the license terms & conditions of the packages included.

multi-tenant-laravel-saas-boilerplate's People

Contributors

ajaythakkar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.