{"id":21008398,"url":"https://github.com/binarcode/laravel-tenantable","last_synced_at":"2026-03-05T23:15:23.575Z","repository":{"id":44549108,"uuid":"274379518","full_name":"BinarCode/laravel-tenantable","owner":"BinarCode","description":"Just another multi tenant support package for Laravel.","archived":false,"fork":false,"pushed_at":"2024-04-03T12:56:11.000Z","size":638,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-08-09T08:26:26.648Z","etag":null,"topics":["laravelphp","multitenancy"],"latest_commit_sha":null,"homepage":"https://tenantable.binarcode.com/docs/1.0/quickstart.html#what-i-need","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BinarCode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-06-23T10:42:37.000Z","updated_at":"2023-01-19T04:50:58.000Z","dependencies_parsed_at":"2024-04-03T14:06:34.921Z","dependency_job_id":null,"html_url":"https://github.com/BinarCode/laravel-tenantable","commit_stats":{"total_commits":59,"total_committers":4,"mean_commits":14.75,"dds":0.3220338983050848,"last_synced_commit":"900c9289e08ad7cb461c98405b689a04a6264ec6"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinarCode%2Flaravel-tenantable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinarCode%2Flaravel-tenantable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinarCode%2Flaravel-tenantable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinarCode%2Flaravel-tenantable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BinarCode","download_url":"https://codeload.github.com/BinarCode/laravel-tenantable/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225324132,"owners_count":17456460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravelphp","multitenancy"],"created_at":"2024-11-19T09:12:25.901Z","updated_at":"2026-03-05T23:15:23.531Z","avatar_url":"https://github.com/BinarCode.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Tenantable\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"./docs/.vuepress/public/logo.png\"\u003e\u003c/p\u003e\n\n\u003cp align=\"left\"\u003e\n\u003ca href=\"https://packagist.org/packages/binarcode/laravel-tenantable\"\u003e\u003cimg src=\"https://img.shields.io/packagist/dt/binarcode/laravel-tenantable\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/binarcode/laravel-tenantable\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/binarcode/laravel-tenantable\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/binarcode/laravel-tenantable\"\u003e\u003cimg src=\"https://img.shields.io/packagist/l/binarcode/laravel-tenantable\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nJust another multi tenant support package for Laravel. Heavily inspired from [Mohamed Said](https://github.com/themsaid) multitenancy videos. \n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require binarcode/laravel-tenantable\n```\n\nNow lets setup it:\n\n```bash\nphp artisan tenantable:setup\n```\n\n## Usage\n\nLet's say you have the `App\\Models\\Organization` as a tenant model. \n\nThis model has to implement the `BinarCode\\Tenantable\\Tenant\\Contracts\\Tenant` contract.\n\nIf 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.\n\nNow I'll take it step by step, since I was very confused when I implemented my firt multitenancy application. \n\n\n### Migrations\n\nYou 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.\n\n\n... [See oficial documenation](https://tenantable.binarcode.com/docs/1.0/quickstart.html)\n\n\n\n## Testing\n\n``` bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security\n\nIf you discover any security related issues, please email eduard.lupacescu@binarcode.com instead of using the issue tracker.\n\n## Credits\n\n- [All Contributors](../../contributors)\n\n## Credits\n\nThe 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\n\n- [Eduard Lupacescu](https://github.com/binaryk)\n- [All Contributors](../../contributors)\n\n## Alternatives\n\n- [spatie/laravel-multitenancy](https://github.com/spatie/laravel-multitenancy)\n- [tenancy/tenancy](https://tenancy.dev)\n- [stancl/tenancy](https://tenancyforlaravel.com)\n- [gecche/laravel-multidomain](https://github.com/gecche/laravel-multidomain)\n- [romegadigital/multitenancy](https://github.com/romegasoftware/multitenancy)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarcode%2Flaravel-tenantable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinarcode%2Flaravel-tenantable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarcode%2Flaravel-tenantable/lists"}