Skip to content

Example of a shared multitenancy data model using Laravel and MySQL

License

Notifications You must be signed in to change notification settings

crowdskout/laravel-shared-multitenancy

Repository files navigation

laravel-shared-multitenancy

Example of a shared multitenancy data model using Laravel and MySQL

Installing

  1. Install docker if you don't have it https://www.docker.com
  2. Clone repo locally and cd into the project
  3. Start the docker container

make docker-start

  1. SSH into the docker container

./ssh.sh

  1. Migrate and seed

php artisan migrate:fresh php artisan db:seed

Usage

  1. Connect to MySQL shell:

./mysql.sh

  1. Grab an email address from the users table

select email from users limit 5;

  1. Visit http://localhost:8000/ and click login
  2. Use the email address with the password "secret"

MySQL credentials

  • host: 127.0.0.1
  • port: 3306
  • username: dev
  • password: dev
  • database: test

Disclaimer

This project is meant to showcase a relational data model and Laravel Eloquent implementation for shared multitenancy. It is not meant to be run in a production environment without significant changes.

About

Example of a shared multitenancy data model using Laravel and MySQL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages