Rinvex Tenantable is a contextually intelligent polymorphic Laravel package, for single db multi-tenancy.

Overview

Rinvex Tenants

Rinvex Tenants is a contextually intelligent polymorphic Laravel package, for single db multi-tenancy. You can completely isolate tenants data with ease using the same database, with full power and control over what data to be centrally shared, and what to be tenant related and therefore isolated from others.

Packagist Scrutinizer Code Quality Travis StyleCI License

Installation

  1. Install the package via composer:

    composer require rinvex/laravel-tenants
  2. Publish resources (migrations and config files):

    php artisan rinvex:publish:tenants
  3. Execute migrations via the following command:

    php artisan rinvex:migrate:tenants
  4. Done!

Usage

Rinvex Tenants is developed with the concept that every tenantable model can be attached to multiple tenants at the same time, so you don't need special column in your model database table to specify the tenant it belongs to, tenant relationships simply stored in a separate central table.

Scope Queries

To scope your queries correctly, apply the \Rinvex\Tenants\Traits\Tenantable trait on primary models. This will ensure that all calls to your parent models are scoped to the current tenant, and that calls to their child relations are scoped through the parent relationships.

namespace App\Models;

use App\Models\Feature;
use Rinvex\Tenants\Traits\Tenantable;
use Illuminate\Database\Eloquent\Model;

class Product extends Model
{
    use Tenantable;

    public function features()
    {
        return $this->hasMany(Feature::class);
    }
}

Scope Child Model Queries

If you have child models, like product features, and these features belongs to tenantable products via a relationship, you may need to scope these feature model queries as well. For that, you need to apply the \Rinvex\Tenants\Traits\TenantableChild trait on your child models, and define a new method getRelationshipToTenantable that returns a string of the parent relationship. Check the following example.

namespace App\Models;

use App\Models\Product;
use Illuminate\Database\Eloquent\Model;
use Rinvex\Tenants\Traits\TenantableChild;

class Feature extends Model
{
    use TenantableChild;

    public function getRelationshipToTenantable(): string
    {
        return 'product';
    }

    public function product()
    {
        return $this->belongsTo(Product::class);
    }
}

And this will automatically scope the all App\Models\Feature::class queries to the current tenant. Note that the limitation of this is that you need to be able to define a relationship to a primary model, so if you need to do this on deeper level of children hierarchy, like a App\Models\Discount::class model that belongs to App\Models\Feature::class which belongs to App\Models\Product::class which belongs to a Tenant Rinvex\Tenants\Models\Tenant::class, you need to define some strange relationship. Laravel supports HasOneThrough, but not BelongsToThrough, so you'd need to do some hacks around that.

Manage your tenants

Nothing special here, just normal Eloquent model stuff:

// Create a new tenant
app('rinvex.tenants.tenant')->create([
    'name' => 'ACME Inc.',
    'slug' => 'acme',
    'domain' => 'acme.test',
    'email' => '[email protected]',
    'language_code' => 'en',
    'country_code' => 'us',
]);

// Get existing tenant by id
$tenant = app('rinvex.tenants.tenant')->find(1);

Notes: since Rinvex Tenants extends and utilizes other awesome packages, checkout the following documentations for further details:

Automatic Tenants Registration

Tenants are automatically registered into Service Container very early in the request, through service provider boot method.

That way you'll have access to the current active tenant before models are loaded, scopes are needed, or traits are booted. That's also earlier than routes registration, and middleware pipeline, so you can assure any resources that needs to be scoped, are correctly scoped.

Changing Active Tenant

You can easily change current active tenant at any point of the request as follows:

    $tenant = app('rinvex.tenants.tenant')->find(123);
    app()->bind('request.tenant', fn() => $tenant);

And to deactivate your tenant and stop scoping by it, simply set the same container service binding to null as follows:

    app()->bind('request.tenant', null);

Notes:

  • Only one tenant could be active at a time, even if your resources belongs to multiple tenants.
  • You can change the active tenant at any point of the request, but that newly activated tenant will only scope models retrieved after that change, while any other models retrieved at an earlier stage of the request will be scoped with the previous tenant, or not scoped at all (according to your logic).
  • If a resource belongs to multiple tenants, you can switch between tenants by to a different tenant by reinitializing the request. Example: since tenants are currently resolved by domains or subdomains, to switch tenants you'll need to redirect the user the new tenant domain/subdomain, and the currently active tenant will be switched as well as the request will be automatically scoped by the new tenant.

Default Tenant Resolvers

Rinvex Tenants resolve currently active tenant using Resolver Classes. It comes with few default resolvers that you can use, or you can build your own custom resolver to support additional functionality.

Default tenant resolver classes in config options:

    // Tenant Resolver Class:
    // - \Rinvex\Tenants\Http\Resolvers\DomainTenantResolver::class
    // - \Rinvex\Tenants\Http\Resolvers\SubdomainTenantResolver::class
    // - \Rinvex\Tenants\Http\Resolvers\SubdomainOrDomainTenantResolver::class
    'resolver' => \Rinvex\Tenants\Resolvers\SubdomainOrDomainTenantResolver::class,

The default tenant resolver used is SubdomainOrDomainTenantResolver::class, so this package automatically resolve currently active tenant using both domains and subdomains. You can change that via config options.

Central Domains

Rinvex Tenants supports running your application on multiple domains, we call them central domains. It also supports more sophisticated use cases, but that's out of this package's scope.

For that reason, this package expects you to have the following config option in your config/app.php:

    'domains' => [
        'domain.net' => [],
        'example.com' => [],
    ],

Default Domain

The reason you need to add the above config option in the same format, is that it's meant to support more advanced use cases that's not covered by this package. If you need to check some of these use cases proceed to Cortex Tenants which is an application module implementing accessareas concepts, and allows different domains to access different accessareas (i.e. frontarea, adminarea, managerarea, tenantarea ..etc). The baseline here is that you need to add the above config option to your config/app.php and specify all your application domains.

You need to add the default domain to the domains list, since this package automatically overrides the default Laravel config option app.url with the matched domain, although you may need to write some application logic. Checkout the above mentioned Cortex Tenants module for an example.

Tenant Domains

Tenants could be accessed via central subdomains (obviously subdomains on central domains), or via their own dedicated domains.

For example if the default domain is rinvex.com, and tenant slug is cortex then central subdomain will be cortex.rinvex.com.

Note that since this package supports multiple central domains, tenants will be accessible via all central subdomains, so if we have another alias central domain rinvex.net, you can expect cortex to be available on cortex.rinvex.net as well.

Tenants can optionally have top level domains of their own too, something like test-example.com, which means it's now accessible through three different domains:

  • cortex.rinvex.com
  • cortex.rinvex.net
  • test-example.com

Session Domain

Since Rinvex Tenants supports multiple central and tenant domains, it needs to change the default laravel session configuration on the fly, and that's actually what it does. It will dynamically change session.domain config option based on the current request host.

Note: Due to security reasons, accessing the same application through multiple top level domains (.rinvex.com & .rinvex.net) means the user will need to login for each different domain, as their session and cookies are tied to the top level domain. Example: if the user logged in to cortex.rinvex.com they will stay logged-in to the top level domain rinvex.com and all it's subdomains like website.rinvex.com, but they will not be logged in to cortex.rinvex.net even if both domains directs to the same application, they will need to login again there. This is a known limitation due to enforced security restrictions by the browser. We may create a workaround in the future, but it's a bit complicated, and involves third-party cookies and CORS, so feel free to send a PR if you have a creative solution.

Querying Tenant Scoped Models

After you've added tenants, all queries against a tenantable Model will be scoped automatically:

// This will only include Models belonging to the currently active tenant
$tenantProducts = \App\Models\Product::all();

// This will fail with a `ModelNotFoundForTenantException` if it belongs to the wrong tenant
$product = \App\Models\Product::find(2);

If you need to query across all tenants, you can use forAllTenants() method:

// Will include results from ALL tenants, just for this query
$allTenantProducts = \App\Models\Product::forAllTenants()->get();

Under the hood, Rinvex Tenants uses Laravel's Global Scopes, which means if you are scoping by active tenant, and you want to exclude one single query, you can do so:

// Will NOT be scoped, and will return results from ALL tenants, just for this query
$allTenantProducts = \App\Models\Product::withoutTenants()->get();

Notes:

  • When you are developing multi-tenancy applications, it can be confusing sometimes why you keep getting ModelNotFound exceptions for rows that DO exist, because they belong to the wrong tenant.
  • Rinvex Tenants will catch those exceptions, and re-throw them as ModelNotFoundForTenantException, to help you out 🙂

Manage your tenantable model

The API is intutive and very straightforward, so let's give it a quick look:

// Get instance of your model
$product = new \App\Models\Product::find(1);

// Get attached tenants collection
$product->tenants;

// Get attached tenants query builder
$product->tenants();

You can attach tenants in various ways:

// Single tenant id
$product->attachTenants(1);

// Multiple tenant IDs array
$product->attachTenants([1, 2, 5]);

// Multiple tenant IDs collection
$product->attachTenants(collect([1, 2, 5]));

// Single tenant model instance
$tenantInstance = app('rinvex.tenants.tenant')->first();
$product->attachTenants($tenantInstance);

// Single tenant slug
$product->attachTenants('test-tenant');

// Multiple tenant slugs array
$product->attachTenants(['first-tenant', 'second-tenant']);

// Multiple tenant slugs collection
$product->attachTenants(collect(['first-tenant', 'second-tenant']));

// Multiple tenant model instances
$tenantInstances = app('rinvex.tenants.tenant')->whereIn('id', [1, 2, 5])->get();
$product->attachTenants($tenantInstances);

Notes:

  • The attachTenants() method attach the given tenants to the model without touching the currently attached tenants, while there's the syncTenants() method that can detach any records that's not in the given items, this method takes a second optional boolean parameter that's set detaching flag to true or false.
  • To detach model tenants you can use the detachTenants() method, which uses exactly the same signature as the attachTenants() method, with additional feature of detaching all currently attached tenants by passing null or nothing to that method as follows: $product->detachTenants();.

And as you may have expected, you can check if tenants attached:

// Single tenant id
$product->hasAnyTenants(1);

// Multiple tenant IDs array
$product->hasAnyTenants([1, 2, 5]);

// Multiple tenant IDs collection
$product->hasAnyTenants(collect([1, 2, 5]));

// Single tenant model instance
$tenantInstance = app('rinvex.tenants.tenant')->first();
$product->hasAnyTenants($tenantInstance);

// Single tenant slug
$product->hasAnyTenants('test-tenant');

// Multiple tenant slugs array
$product->hasAnyTenants(['first-tenant', 'second-tenant']);

// Multiple tenant slugs collection
$product->hasAnyTenants(collect(['first-tenant', 'second-tenant']));

// Multiple tenant model instances
$tenantInstances = app('rinvex.tenants.tenant')->whereIn('id', [1, 2, 5])->get();
$product->hasAnyTenants($tenantInstances);

Notes:

  • The hasAnyTenants() method check if ANY of the given tenants are attached to the model. It returns boolean true or false as a result.
  • Similarly the hasAllTenants() method uses exactly the same signature as the hasAnyTenants() method, but it behaves differently and performs a strict comparison to check if ALL of the given tenants are attached.

Advanced Usage

Generate Tenant Slugs

Rinvex Tenants auto generates slugs and auto detect and insert default translation for you if not provided, but you still can pass it explicitly through normal eloquent create method, as follows:

app('rinvex.tenants.tenant')->create(['name' => ['en' => 'My New Tenant'], 'slug' => 'custom-tenant-slug']);

Note: Check Sluggable package for further details.

Smart Parameter Detection

Rinvex Tenants methods that accept list of tenants are smart enough to handle almost all kinds of inputs as you've seen in the above examples. It will check input type and behave accordingly.

Retrieve All Models Attached To The Tenant

You may encounter a situation where you need to get all models attached to certain tenant, you do so with ease as follows:

$tenant = app('rinvex.tenants.tenant')->find(1);
$tenant->entries(\App\Models\Product::class);

Query Scopes

Yes, Rinvex Tenants shipped with few awesome query scopes for your convenience, usage example:

// Single tenant id
$product->withAnyTenants(1)->get();

// Multiple tenant IDs array
$product->withAnyTenants([1, 2, 5])->get();

// Multiple tenant IDs collection
$product->withAnyTenants(collect([1, 2, 5]))->get();

// Single tenant model instance
$tenantInstance = app('rinvex.tenants.tenant')->first();
$product->withAnyTenants($tenantInstance)->get();

// Single tenant slug
$product->withAnyTenants('test-tenant')->get();

// Multiple tenant slugs array
$product->withAnyTenants(['first-tenant', 'second-tenant'])->get();

// Multiple tenant slugs collection
$product->withAnyTenants(collect(['first-tenant', 'second-tenant']))->get();

// Multiple tenant model instances
$tenantInstances = app('rinvex.tenants.tenant')->whereIn('id', [1, 2, 5])->get();
$product->withAnyTenants($tenantInstances)->get();

Notes:

  • The withAnyTenants() scope finds products with ANY attached tenants of the given. It returns normally a query builder, so you can chain it or call get() method for example to execute and get results.
  • Similarly there's few other scopes like withAllTenants() that finds products with ALL attached tenants of the given, withoutTenants() which finds products without ANY attached tenants of the given, and lastly withoutAnyTenants() which find products without ANY attached tenants at all. All scopes are created equal, with same signature, and returns query builder.

Tenant Translations

Manage tenant translations with ease as follows:

$tenant = app('rinvex.tenants.tenant')->find(1);

// Update title translations
$tenant->setTranslation('name', 'en', 'New English Tenant Title')->save();

// Alternatively you can use default eloquent update
$tenant->update([
    'name' => [
        'en' => 'New Tenant',
        'ar' => 'مستأجر جديد',
    ],
]);

// Get single tenant translation
$tenant->getTranslation('name', 'en');

// Get all tenant translations
$tenant->getTranslations('name');

// Get tenant title in default locale
$tenant->name;

Note: Check Translatable package for further details.

Changelog

Refer to the Changelog for a full history of the project.

Support

The following support channels are available at your fingertips:

Contributing & Protocols

Thank you for considering contributing to this project! The contribution guide can be found in CONTRIBUTING.md.

Bug reports, feature requests, and pull requests are very welcome.

Security Vulnerabilities

If you discover a security vulnerability within this project, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.

About Rinvex

Rinvex is a software solutions startup, specialized in integrated enterprise solutions for SMEs established in Alexandria, Egypt since June 2016. We believe that our drive The Value, The Reach, and The Impact is what differentiates us and unleash the endless possibilities of our philosophy through the power of software. We like to call it Innovation At The Speed Of Life. That’s how we do our share of advancing humanity.

License

This software is released under The MIT License (MIT).

(c) 2016-2021 Rinvex LLC, Some rights reserved.

Comments
  • Call to undefined method: Rinvex\Tenants\Models\Tenant::create()

    Call to undefined method: Rinvex\Tenants\Models\Tenant::create()

    I am trying to create a tenant with this code:

    app('rinvex.tenants.tenant')->create([ 'name' => 'ACME Inc.', 'slug' => 'acme', 'owner_id' => '1', 'email' => '[email protected]', 'language_code' => 'en', 'country_code' => 'us', ]); But i keep getting Call to undefined method: Rinvex\Tenants\Models\Tenant::create(). Thank you.

    opened by Peter2962 17
  • I cant get tenant from User Model and make this work with Observer

    I cant get tenant from User Model and make this work with Observer

    Hello, first thanks for this package.

    I have this scenario:

    i Have this Middleware: \App\Http\Middleware\Tenant::class, i get tenant id from user Model

    public function handle(Request $request, Closure $next)
    {
        if( Schema::hasTable('tenants') ) {
            if (auth()->check()) {
                $tenant = app('rinvex.tenants.tenant')->find(backpack_user()->tenants());
            } else {
                $tenant = null;
            }
    
            app()->singleton('request.tenant', fn() => $tenant); // setear null si se quiere ver todo
        }
    
        return $next($request);
    }
    

    This work for almost everything, except when i use Observer, is look like when Observer is add this make laravel execute models before middleware, and thats make ignore the scope.

    How can i make this: get id from user model and make this package work with observer?

    Thanks in advance.

    opened by jorgetwgroup 1
  • Update codedungeon/phpunit-result-printer requirement from ^0.30.0 to ^0.30.0 || ^0.31.0

    Update codedungeon/phpunit-result-printer requirement from ^0.30.0 to ^0.30.0 || ^0.31.0

    Updates the requirements on codedungeon/phpunit-result-printer to permit the latest version.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Upgrade to GitHub-native Dependabot

    Upgrade to GitHub-native Dependabot

    Dependabot Preview will be shut down on August 3rd, 2021. In order to keep getting Dependabot updates, please merge this PR and migrate to GitHub-native Dependabot before then.

    Dependabot has been fully integrated into GitHub, so you no longer have to install and manage a separate app. This pull request migrates your configuration from Dependabot.com to a config file, using the new syntax. When merged, we'll swap out dependabot-preview (me) for a new dependabot app, and you'll be all set!

    With this change, you'll now use the Dependabot page in GitHub, rather than the Dependabot dashboard, to monitor your version updates, and you'll configure Dependabot through the new config file rather than a UI.

    Your previous schedule was set to live. This option is no longer supported in the new config file so it has been changed to daily.

    If you've got any questions or feedback for us, please let us know by creating an issue in the dependabot/dependabot-core repository.

    Learn more about migrating to GitHub-native Dependabot

    Please note that regular @dependabot commands do not work on this pull request.

    dependencies 
    opened by dependabot-preview[bot] 1
  • Update codedungeon/phpunit-result-printer requirement from ^0.27.0 to ^0.27.0 || ^0.30.0

    Update codedungeon/phpunit-result-printer requirement from ^0.27.0 to ^0.27.0 || ^0.30.0

    Updates the requirements on codedungeon/phpunit-result-printer to permit the latest version.

    Changelog

    Sourced from codedungeon/phpunit-result-printer's changelog.

    [0.30.0] -- 2020.12.02

    Changed

    • Added PHP 8.x support

    [0.29.3] -- 2020.09.23

    Changed

    • Added opearting system check when initializing AnyBar (should only be available on macOS)

    [0.29.2] -- 2020.09.23

    Changed

    • Moved use PrinterTrait from Printer.php to ResultPrinter71.php to address issue 169

    Fixed

    [0.29.1] -- 2020.09.16

    Changed

    • Updated local phpunit-printer.yml to include cd-printer-dont-format-classname when package initialized

    [0.29.0] -- 2020.09.16

    Added

    • updated hassankhan/config to latest version at time of release
    • Added cd-printer-dont-format-classname option (see phpunit-printer.yml file)

    [0.28.0] - 2020-03-xx

    Added

    • Added support for symfony 5
      • Updated symfony/yaml to included ^5.0 version
    • Added support for symfony/php-bridge
    • Removed internal phpunit/phpunit dependency to fix issue when using with symfony
    • Updated hassankhan/config dependency to use latest version (2.1 as of this release)
    • Added --collision flag to init method which will add the Collision Listener
      • This flag should is only applicable working with Laravel Applications
      • If supplied but not using Laravel, it will be ignroed

    Information

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 1
  • Update codedungeon/phpunit-result-printer requirement from ^0.27.0 to ^0.27.0 || ^0.29.0

    Update codedungeon/phpunit-result-printer requirement from ^0.27.0 to ^0.27.0 || ^0.29.0

    Updates the requirements on codedungeon/phpunit-result-printer to permit the latest version.

    Changelog

    Sourced from codedungeon/phpunit-result-printer's changelog.

    [0.29.0] -- 2020.09.16

    Added

    • updated hassankhan/config to latest version at time of release
    • Added cd-printer-dont-format-classname option (see phpunit-printer.yml file)

    [0.28.0] - 2020-03-xx

    Added

    • Added support for symfony 5
      • Updated symfony/yaml to included ^5.0 version
    • Added support for symfony/php-bridge
    • Removed internal phpunit/phpunit dependency to fix issue when using with symfony
    • Updated hassankhan/config dependency to use latest version (2.1 as of this release)
    • Added --collision flag to init method which will add the Collision Listener
      • This flag should is only applicable working with Laravel Applications
      • If supplied but not using Laravel, it will be ignroed

    Information

    • Addressed issues with PHPUnit 8.3.x and usage of PHPUnit\TextUI\ResultPrinter which was temporarily marked as Internal (changed to Interface in PHPUnit 9)
      • Decided to leave this deprecation notice as is, addressing the issue in PHPUnit 8.5 or greater will address the issue officially

    [0.27.0] - 2020-02-29

    Added

    • Added support for PHPUnit 9.0
    • Changed output character for skipped tests (cd-skipped flag in phpunit-printer.yml)
    • Refactored tests to check for custom template path for each command

    Credits

    phpunit-result-printer written by Mike Erickson

    E-Mail: [email protected]

    Twitter: @codedungeon

    Website: https://github.com/mikeerickson

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 1
  • Update codedungeon/phpunit-result-printer requirement from ^0.27.0 to ^0.27.0 || ^0.28.0

    Update codedungeon/phpunit-result-printer requirement from ^0.27.0 to ^0.27.0 || ^0.28.0

    Updates the requirements on codedungeon/phpunit-result-printer to permit the latest version.

    Release notes

    Sourced from codedungeon/phpunit-result-printer's releases.

    Release 0.28.0

    Corrected phpunit-printer.yml, removing from .gitignore

    Changelog

    Sourced from codedungeon/phpunit-result-printer's changelog.

    [0.28.0] - 2020-03-xx

    Added

    • Added support for symfony 5
      • Updated symfony/yaml to included ^5.0 version
    • Added support for symfony/php-bridge
    • Removed internal phpunit/phpunit dependency to fix issue when using with symfony
    • Updated hassankhan/config dependency to use latest version (2.1 as of this release)
    • Added --collision flag to init method which will add the Collision Listener
      • This flag should is only applicable working with Laravel Applications
      • If supplied but not using Laravel, it will be ignroed

    Information

    • Addressed issues with PHPUnit 8.3.x and usage of PHPUnit\TextUI\ResultPrinter which was temporarily marked as Internal (changed to Interface in PHPUnit 9)
      • Decided to leave this deprecation notice as is, addressing the issue in PHPUnit 8.5 or greater will address the issue officially

    [0.27.0] - 2020-02-29

    Added

    • Added support for PHPUnit 9.0
    • Changed output character for skipped tests (cd-skipped flag in phpunit-printer.yml)
    • Refactored tests to check for custom template path for each command

    Credits

    phpunit-result-printer written by Mike Erickson

    E-Mail: [email protected]

    Twitter: @codedungeon

    Website: https://github.com/mikeerickson

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 1
  • Unable to install on laravel 7 and php 7.3

    Unable to install on laravel 7 and php 7.3

    I set up a new project and was unable to install the package. here's what I'm getting

    `composer require rinvex/laravel-tenants Using version ^3.0 for rinvex/laravel-tenants ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

    Problem 1 - Conclusion: remove laravel/framework v7.0.0 - Conclusion: don't install laravel/framework v7.0.0 - rinvex/laravel-tenants v3.0.0 requires illuminate/database ^6.0.0 -> satisfiable by illuminate/database[6.x-dev, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.10.0, v6.11.0, v6.12.0, v6.13.0, v6.13.1, v6.14.0, v6.15.0, v6.15.1, v6.16.0, v6.17.0, v6.17.1, v6.18.0, v6.18.1, v6.18.2, v6.18.3, v6.18.4, v6.18.5, v6.18.6, v6.2.0, v6.3.0, v6.4.1, v6.5.0, v6.5.1, v6.5.2, v6.6.0, v6.6.1, v6.6.2, v6.7.0, v6.8.0]. - rinvex/laravel-tenants v3.0.1 requires illuminate/database ^6.0.0 -> satisfiable by illuminate/database[6.x-dev, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.10.0, v6.11.0, v6.12.0, v6.13.0, v6.13.1, v6.14.0, v6.15.0, v6.15.1, v6.16.0, v6.17.0, v6.17.1, v6.18.0, v6.18.1, v6.18.2, v6.18.3, v6.18.4, v6.18.5, v6.18.6, v6.2.0, v6.3.0, v6.4.1, v6.5.0, v6.5.1, v6.5.2, v6.6.0, v6.6.1, v6.6.2, v6.7.0, v6.8.0]. - rinvex/laravel-tenants v3.0.2 requires illuminate/database ^6.0.0 -> satisfiable by illuminate/database[6.x-dev, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.10.0, v6.11.0, v6.12.0, v6.13.0, v6.13.1, v6.14.0, v6.15.0, v6.15.1, v6.16.0, v6.17.0, v6.17.1, v6.18.0, v6.18.1, v6.18.2, v6.18.3, v6.18.4, v6.18.5, v6.18.6, v6.2.0, v6.3.0, v6.4.1, v6.5.0, v6.5.1, v6.5.2, v6.6.0, v6.6.1, v6.6.2, v6.7.0, v6.8.0]. - rinvex/laravel-tenants v3.0.3 requires illuminate/database ^6.0.0 -> satisfiable by illuminate/database[6.x-dev, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.10.0, v6.11.0, v6.12.0, v6.13.0, v6.13.1, v6.14.0, v6.15.0, v6.15.1, v6.16.0, v6.17.0, v6.17.1, v6.18.0, v6.18.1, v6.18.2, v6.18.3, v6.18.4, v6.18.5, v6.18.6, v6.2.0, v6.3.0, v6.4.1, v6.5.0, v6.5.1, v6.5.2, v6.6.0, v6.6.1, v6.6.2, v6.7.0, v6.8.0]. - don't install illuminate/database 6.x-dev|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.0.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.0.1|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.0.2|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.0.3|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.0.4|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.1.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.10.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.11.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.12.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.13.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.13.1|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.14.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.15.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.15.1|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.16.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.17.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.17.1|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.18.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.18.1|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.18.2|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.18.3|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.18.4|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.18.5|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.18.6|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.2.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.3.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.4.1|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.5.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.5.1|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.5.2|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.6.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.6.1|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.6.2|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.7.0|don't install laravel/framework v7.0.0 - don't install illuminate/database v6.8.0|don't install laravel/framework v7.0.0 - Installation request for laravel/framework 7.0 -> satisfiable by laravel/framework[v7.0.0]. - Installation request for rinvex/laravel-tenants ^3.0 -> satisfiable by rinvex/laravel-tenants[v3.0.0, v3.0.1, v3.0.2, v3.0.3].

    Installation failed, reverting ./composer.json to its original content.`

    opened by fahmifitu 1
  • Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files.

    As a result, Dependabot couldn't update your dependencies.

    The error Dependabot encountered was:

    Your requirements could not be resolved to an installable set of packages.
      Problem 1
        - rinvex/laravel-support[v5.0.0, ..., v5.0.1] require felixkiss/uniquewith-validator ^3.4.0 -> satisfiable by felixkiss/uniquewith-validator[3.4.0].
        - rinvex/laravel-support v5.0.2 requires rinvex/tmp-felixkiss-uniquewith-validator 3.4.0 -> satisfiable by rinvex/tmp-felixkiss-uniquewith-validator[3.4.0].
        - felixkiss/uniquewith-validator 3.4.0 requires illuminate/support ^5.5|^6.0|^7.0 -> found illuminate/support[v5.5.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev] but it conflicts with your root composer.json require (^8.0.0 || ^9.0.0).
        - rinvex/tmp-felixkiss-uniquewith-validator 3.4.0 requires illuminate/support ^5.5|^6.0|^7.0 -> found illuminate/support[v5.5.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev] but it conflicts with your root composer.json require (^8.0.0 || ^9.0.0).
        - Root composer.json requires rinvex/laravel-support ^5.0.0 -> satisfiable by rinvex/laravel-support[v5.0.0, v5.0.1, v5.0.2].
    

    If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

    View the update logs.

    opened by dependabot-preview[bot] 0
  • Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files.

    As a result, Dependabot couldn't update your dependencies.

    The error Dependabot encountered was:

    Your requirements could not be resolved to an installable set of packages.
      Problem 1
        - felixkiss/uniquewith-validator 3.4.0 requires illuminate/support ^5.5|^6.0|^7.0 -> found illuminate/support[v5.5.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev] but it conflicts with your root composer.json require (^8.0.0 || ^9.0.0).
        - rinvex/laravel-support v5.0.0 requires felixkiss/uniquewith-validator ^3.4.0 -> satisfiable by felixkiss/uniquewith-validator[3.4.0].
        - Root composer.json requires rinvex/laravel-support ^5.0.0 -> satisfiable by rinvex/laravel-support[v5.0.0].
    

    If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

    View the update logs.

    opened by dependabot-preview[bot] 0
  • Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files.

    As a result, Dependabot couldn't update your dependencies.

    The error Dependabot encountered was:

    Your requirements could not be resolved to an installable set of packages.
      Problem 1
        - felixkiss/uniquewith-validator 3.4.0 requires illuminate/support ^5.5|^6.0|^7.0 -> found illuminate/support[v5.5.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev] but it conflicts with your root composer.json require (^8.0.0 || ^9.0.0).
        - rinvex/laravel-support v5.0.0 requires felixkiss/uniquewith-validator ^3.4.0 -> satisfiable by felixkiss/uniquewith-validator[3.4.0].
        - Root composer.json requires rinvex/laravel-support ^5.0.0 -> satisfiable by rinvex/laravel-support[v5.0.0].
    
    

    If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

    View the update logs.

    opened by dependabot-preview[bot] 0
Owner
Rinvex
value.reach.impact
Rinvex
A simple laravel package to enable cascade deleting on polymorphic relations.

Morph Cascade Delete A simple laravel package to enable cascade deleting on polymorphic relations. Installation Install with composer composer requi

Moataz Hajres 18 May 15, 2022
A Laravel 8 and Livewire 2 demo showing how to search and filter by tags, showing article and video counts for each tag (Polymorphic relationship)

Advanced search and filter with Laravel and Livewire A demo app using Laravel 8 and Livewire 2 showing how to implement a list of articles and tags, v

SĂ©rgio Jardim 19 Aug 29, 2022
This is an open source demo of administration panel for polymorphic relationship and SEO content

Laravel SEO admin This application demonstrates usage of polymorphic relationships described at (http://maxoffsky.com/code-blog/using-polymorphic-rela

Maksim Surguy 127 Oct 11, 2022
Easily integrate single-database multi tenant features into your Laravel application

Laravel Tenant Aware Easily integrate single-database multi tenant features into your Laravel application. Installation You can install the package vi

H-FARM Innovation 9 Dec 21, 2022
Run multiple websites using the same Laravel installation while keeping tenant specific data separated for fully independent multi-domain setups, previously github.com/hyn/multi-tenant

The unobtrusive Laravel package that makes your app multi tenant. Serving multiple websites, each with one or more hostnames from the same codebase. B

Tenancy 2.4k Jan 3, 2023
Taskpm - Run multi tasks by PHP multi process

php-pkg-template Run multi tasks by PHP multi process Install composer composer require phppkg/taskpm Usage github: use the template for quick create

PHPPkg 2 Dec 20, 2021
This Package helps you in laravel application to log all desired activity for each request from request entry point to generate response at a single snapshot.

Laravel Scenario Logger This Package helps you in laravel application to log all desired activity for each request from request entry point to generat

Mehrdad Mahdian 6 Sep 27, 2021
Laravel Larex lets you translate your whole Laravel application from a single CSV file.

Laravel Larex Translate Laravel Apps from a CSV File Laravel Larex lets you translate your whole Laravel application from a single CSV file. You can i

Luca Patera 68 Dec 12, 2022
A Laravel package that allows you to use multiple ".env" files in a precedent manner. Use ".env" files per domain (multi-tentant)!

Laravel Multi ENVs Use multiple .envs files and have a chain of precedence for the environment variables in these different .envs files. Use the .env

Allyson Silva 48 Dec 29, 2022
Update multiple Laravel Model records, each with it's own set of values, sending a single query to your database!

Laravel Mass Update Update multiple Laravel Model records, each with its own set of values, sending a single query to your database! Installation You

Jorge González 88 Dec 31, 2022
A Single Table Inheritance Trait for Eloquent/Laravel

Single Table Inheritance Credit This code is a fork of Nanigans/single-table-inheritance. I've only updated it to work with Laravel 5 Single Table Inh

Peter Haza 15 Feb 17, 2022
A Single Table Inheritance Trait for Eloquent/Laravel

Single Table Inheritance Single Table Inheritance is a trait for Laravel 5.8+ Eloquent models that allows multiple models to be stored in the same dat

Jon Palmer 240 Oct 26, 2022
Generate robust laravel athorization without writing a single line of code.

Implement robust laravel authorization logic without writing a single line of code This package helps you to quickly create strong policy authorizatio

Flixtechs 29 Oct 15, 2022
A single-field repeater for Filament. ⚡️

A single-field repeater for Filament. This is where your description should go. Limit it to a paragraph or two. Consider adding a small example. Insta

Ryan Chandler 3 Mar 5, 2022
A simple pure PHP RADIUS client supporting Standard and Vendor-Specific Attributes in single file

BlockBox-Radius A simple pure PHP RADIUS client supporting Standard and Vendor-Specific Attributes in single file Author: Daren Yeh [email protected]

null 2 Oct 2, 2022
A Laravel extension for using a laravel application on a multi domain setting

Laravel Multi Domain An extension for using Laravel in a multi domain setting Description This package allows a single Laravel installation to work wi

null 658 Jan 6, 2023
Tiny hands is a Laravel multi-tenant boilerplate with SPA and i18n.

About Tiny Hands Tiny hands is a Laravel multi-tenant boilerplate with SPA and i18n using the following technology stack: Backend Laravel 8.0 API with

Bertrand Kintanar 12 Jun 23, 2022
🧙‍♀️ Arcanist takes the pain out of building multi-step form wizards in Laravel.

Installation Arcanist requires PHP 8 and Laravel 8. composer require laravel-arcanist/arcanist Documentation You can find the full documentation here

Arcanist 378 Jan 3, 2023
Run multiple websites using the same Laravel installation while keeping tenant specific data separated for fully independent multi-domain setups.

Tenancy for Laravel Enabling awesome Software as a Service with the Laravel framework. This is the successor of hyn/multi-tenant. Feel free to show su

Tenancy 1.1k Dec 30, 2022