tenancy
tenancy copied to clipboard
Automatic multi-tenancy for Laravel. No code changes needed.
This PR adds the helper function, which automatically passes the tenant parameter. **Before** `route('my-route-name', ['tenant' => tenant(), 'my-app-param' => 'foo'])` **After** `tenant_path_route('my-route-name', ['my-app-param' => 'foo'])`
## Problem When a model is being created somewhere, it may need a bit more extra data than what's in the synced attributes. The synced attributes are used for updates,...
We'll either merge this PR or #689 (after force pushing these changes into that branch), but for wrapping up the changes we'll be using this PR.
As discussed sometime on Discord I'm opening a PR to use Github Actions native services and `shivammathur/setup-php`. This way we don't have to maintain a Dockerfile for this project anymore...
Resolved conflicts in #782 ### Original description As discussed here #779, this PR adds a new feature to this package: **pending tenants**. This adds: - Four new config settings: `pending.include_in_scope`,...
[4.x] Add command to bring the tenants up and down from maintenance and remove deprecated exception
This PR changes the maintenance mode to comply to the changes made in Laravel 8. **New** - Adds two CLI commands to the package: `tenancy:up` and `tenancy:down` with the same...
This fixes #78 and #201 and enables using `Storage::url('file.jpg')` with local driver in tenants (see [Laravel docs](https://laravel.com/docs/8.x/filesystem#file-urls)). With this, you can use for example Spatie media library and local disk...
### Bug description I'm getting this deprecation notice (PHP 8.1): PHP Deprecated: Accessing static trait property Stancl\Tenancy\Database\Concerns\BelongsToTenant::$tenantIdColumn is deprecated, it should only be accessed on a class using the trait...
If using Domains/Subdomains, we are forced to use a Domain Model for our Tenant Model: ``` public function domains() { return $this->hasMany(config('tenancy.domain_model'), 'tenant_id'); } ``` But what about in scenarios...