Multitenancy with Laravel

The premium course and package for creating multitenanted Laravel apps.

Sign up to the newsletter

What is multitenancy?

In its simplest form, multitenancy is a way of structuring a piece of software so that a single instance, or installation, runs as if it were multiple instances or installations.

There are many ways to go about achieving multitenancy, but there are some core archetypes, each with their own variations and options, that make multitenancy a broader spectrum.

The Course

The course breaks down all of the concepts behind multitenancy and explains them in an easily digestible manner, as well walking you through how to implement them in a Laravel application.

The course also covers use-cases for each concept, their compatibility with other involved concepts, and examples of existing systems that make use of them.

The Package

The package, named Porter, is a configurable implementation of the course. It is designed to be used when creating a full multitenancy solution isn’t viable, whether that’s because of time, knowledge or experience.

Porter is designed to be as non-invasive as possible, allowing you to write your application like you would normally, with all the multitenancy functionality being handled automatically.

But what is included?

Both the course and package cover a whole range of topics and concepts, including the different branches, options and limitations that come from each of them.

All examples for the course will be part of building a fictional multitenanted blogging platform, much like wordpress.com, albeit a simpler version.

  • Getting Started
    • An introduction to multitenancy
    • When should you use multitenancy?
    • What about multi-instance?
    • Building a tenant manager
  • Identifying Tenants
    • Using subdomains and/or domains
    • Using part of the URI
    • Using the currently authenticated user
    • Using a value stored in the session
    • Using a HTTP header
  • Databases
    • One database for all tenants
    • One database per tenant
    • Creating a tenant database
    • Creating tenant database credentials
    • Tenant specific migrations
    • Tenant specific seeding
    • Sharing data from a global database
  • Dealing with Users
    • Tenant specific users
    • Global shared users
    • Linking tenant users, the slack way
  • Assets
    • Public tenant assets
    • Private tenant assets
    • Proxying CDNs
    • Restricting tenant asset access
  • Laravel Functionality
    • Making cookies tenant specific
    • Making sessions tenant specific
    • Making a multitenanted cache
    • Making queues multitenanted
    • Making file storage multitenanted
  • Configuration
    • Tenant specific app keys
    • Overriding the config for tenants
    • Securely storing third party credentials
  • Templating and Views
    • Preset themes
    • Custom themes with CSS variables
    • Custom themes with SCSS
    • Using blade namespaces
  • Features/Modules
    • Modularising your features
    • Limiting tenant access to features
  • Additional/Miscellaneous
    • Tenant middleware
    • The importance of middleware priority
    • The application lifecycle
    • Configuration Apache vhosts
    • Configuring Nginx server blocks
    • Handling DNS
    • Examples of multitenancy

The above is a non-exhaustive list of topics that will be covered by the course. As the course is still in development they may be subject to change.

A lot of the topics covered will be covered in several different ways, as they can differ depending on your choice of identification method, and how you're handling your databases.

How much does it cost?

Course
  • Full course at release
  • All future updates
  • HD Download
£99
Package
  • Priced per project
  • All updates for the current major version
  • Private composer repository
£99
Course & Package
  • Course included
  • Package included
  • 25% discount
£148.50

Want to know more?

If you want to be kept up to date on the progress of the course and/or package, you can fill in the form below to be added to the mailing list.

Alternatively, you can follow me on twitter , or jump on the ollieread.com discord.