https://github.com/binarcode/laravel-tenantable
Just another multi tenant support package for Laravel.
https://github.com/binarcode/laravel-tenantable
laravelphp multitenancy
Last synced: 6 days ago
JSON representation
Just another multi tenant support package for Laravel.
- Host: GitHub
- URL: https://github.com/binarcode/laravel-tenantable
- Owner: BinarCode
- License: mit
- Created: 2020-06-23T10:42:37.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-03T12:56:11.000Z (almost 2 years ago)
- Last Synced: 2024-08-09T08:26:26.648Z (over 1 year ago)
- Topics: laravelphp, multitenancy
- Language: PHP
- Homepage: https://tenantable.binarcode.com/docs/1.0/quickstart.html#what-i-need
- Size: 623 KB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Tenantable

Just another multi tenant support package for Laravel. Heavily inspired from [Mohamed Said](https://github.com/themsaid) multitenancy videos.
## Installation
You can install the package via composer:
```bash
composer require binarcode/laravel-tenantable
```
Now lets setup it:
```bash
php artisan tenantable:setup
```
## Usage
Let's say you have the `App\Models\Organization` as a tenant model.
This model has to implement the `BinarCode\Tenantable\Tenant\Contracts\Tenant` contract.
If you want to benefit of all the methods the contract as you to implement, just extends the `BinarCode\Tenantable\Models\Tenant` class, and you don't have to add anything else in your model.
Now I'll take it step by step, since I was very confused when I implemented my firt multitenancy application.
### Migrations
You need 2 types of migrations, `master` and `tenant`. The migrations in the `app\database\migrations` directory, are used for `tenant`. If you have to add migrations for the `master` use `app\database\migrations\master` directory.
... [See oficial documenation](https://tenantable.binarcode.com/docs/1.0/quickstart.html)
## Testing
``` bash
composer test
```
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Security
If you discover any security related issues, please email eduard.lupacescu@binarcode.com instead of using the issue tracker.
## Credits
- [All Contributors](../../contributors)
## Credits
The code of this package is based on the code shown in [the Multitenancy in Laravel series](https://www.youtube.com/watch?v=592EgykFOz4) by Mohamed Said
- [Eduard Lupacescu](https://github.com/binaryk)
- [All Contributors](../../contributors)
## Alternatives
- [spatie/laravel-multitenancy](https://github.com/spatie/laravel-multitenancy)
- [tenancy/tenancy](https://tenancy.dev)
- [stancl/tenancy](https://tenancyforlaravel.com)
- [gecche/laravel-multidomain](https://github.com/gecche/laravel-multidomain)
- [romegadigital/multitenancy](https://github.com/romegasoftware/multitenancy)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.