So, as mentioned in my first post, I will use Laravel as the base framework to develop this platform. I'm very much familiar with it, and I'm excited to also try its latest features.

One of the key things from a SaaS platform, is that it's composed by different "organizations" using the service. By "organization", I mean one user, one company or many users under the roof of a company. It's just an entity that has access to read and create bits of information in the platform.

In very technical terms, this is called a tenant (or support for multitenancy).

Let's quickly list out some basic models:

  1. A "Company".
  2. A "Website".
  3. A "Webinar".

Therefore: A "Company" can have many websites and a "Website" can have many "Webinars".

My daughter helped me here!

A common issue when building a SaaS product, is when you retrieve for example, all the "Webinars" for a "Website". In very basic code instructions:

consts domain = getDomain()
const website = getWebsiteFrom(domain)
const webinars = getWebinarsFrom(website)

Imagine doing all this filtering, everytime you grab information from the database.

So to solve this, there are some good tenant solutions which will avoid this repetition.

I found this great package called Laravel Tenancy. It's easy to install, has good documentation and supports the latest Laravel version.

Also, I created the repo. I'm referring to this project as Gaku (one version of learning in Japanese), but it can change later.

Yay! Initial repo. 

To end this post and based on the tenancy package, I created in the database one instance for a "Hostname" and one instance for a "Website".

One website instance.
One hostname instance with "gaku.local" as hostname.

Everything works and I get a fresh Laravel instance with tenancy! 🌟

Fresh Laravel instance with tenant support.

PS: It is also good to mention that I'm using MAMP Pro for setting up an Apache Server and MySQL database.