diff --git a/dist/index.html b/dist/index.html index 3641941..344111a 100644 --- a/dist/index.html +++ b/dist/index.html @@ -3,280 +3,372 @@ + + - - + stancl/tenancy — Automatic multi-tenancy for your Laravel app. No code changes needed. - -
- +
+
+
+

Automatic tenancy for your Laravel app

+

No code changes required.

+

stancl/tenancy is a tenancy package that uses a completely new approach to multi-tenancy.

+

Instead of forcing you to change how you write your app, it bootstraps tenancy automatically, in the background.

+ +
+
+
+
+// Create a tenant
+$tenant = Tenant::new()
+    ->withDomains([
+        'tenant1.yourapp.com',
+        'tenant1.com',
+    ])->withPlan('free')
+    ->save();
 
-        
-
-
- -
-

Automatic multi-tenancy for your Laravel app.

-

You won't have to change a thing in your application's code.

-
- -
-
-
    -
  • No model traits to change database connection
  • -
  • No replacing of Laravel classes (Cache, Storage, ...) with tenancy-aware classes
  • -
  • Built-in tenant identification based on hostname (including second level domains)
  • -
-
-
- - -
+// Write your app like you're used to +Order::where('status', 'shipped')->get(); +Cache::get('order_count'); +asset('logo.png'); +dispatch(new SendOrderCreatedMail); +
-
-
- Star - - Laravel 5.8 - Latest Stable Version - Travis CI build - codecov +
+
+
+
+

Easy Installation

+

Two commands is all you need to get started.

+
+composer require stancl/tenancy
+php artisan tenancy:install
+
+

After installation, just focus on what's important to you — writing your app.

+
+ +
-
- -
-
-
-

Multi-tenancy is something that can be handled in the - background. Why should your app's code be polluted with tons of tenancy features - implementations? -

- -

stancl/tenancy is a Laravel package that implements multi-database - tenancy into your application in a way that doesn't require you to change anything in your existing - codebase. -

- -

How does it work?

-
-
    -
  1. The tenant is identified using the current hostname.
  2. -
  3. Database & Redis connections are switched, cache is tagged and filesystem root paths are suffixed.
  4. -
  5. Your code is automatically multi-tenant. No changes needed.
  6. -
-
-
- -
-
-

Easy Installation

-

Just install the package and move your tenant routes.

-
-
-
-$ composer require stancl/tenancy
-$ php artisan tenancy:install
-$ mv routes/web.php routes/tenant.php
-
-
- -
-
-
-cache()->remember('total_revenue', function () {
-   return Order::with('products')->get()->products->sum();
-});
-
-
-

Automatic Data Separation

-

Tenants' databases, Redis stores, filesystems and caches are automatically separated. You can write your app like you're used to and let the package worry about tenant data separation.

-
-
- -
-
-

Configurable

-

Even though everything happens automatically, you're still in control. You can configure how database names, Redis keys and filesystem paths are prefixed, as well as how cache is tagged and what DB/Redis connections and FS disks are made multi-tenant.

-
-
-
-'redis' => [
-  'tenancy' => true,
-  'prefix_base' => 'tenant',
-  'prefixed_connections' => [
-    'default',
-    'cache',
-  ],
-]
-
-
- -
-
-
-$ artisan tenants:seed --tenants=8075a580-1cb8-11e9-8822-49c5d8f8ff23
-Tenant: 8075a580-1cb8-11e9-8822-49c5d8f8ff23 (laravel.localhost)
-Database seeding completed successfully.
-
-
-

CLI-friendly

-

stancl/tenancy comes with artisan commands for - migrating, rolling back, as well as seeding tenant databases.

-
-
- -
-
-

SOLID Extensibility

-

The package follows the SOLID principles and is open to extension. You're free to write - (and contribute! ) - your own storage drivers and database managers. +

+
+
+

Automatic & Flexible

+

Multi-tenancy is something that can be handled in the background.

+

Why should your code be polluted with tons of tenancy-related things? +

+

Why have your code bound to a specific implementation? Handling things in the + background gives you the flexibility to change how tenancy works for your project without pain.

-
-
-class PostgreSQLDatabaseManager implements TenantDatabaseManager
-{
-  public function createDatabase($name)
-  {
-    //
-  }
-
+
- -
- -
-
-

Stay Updated

-

- If you'd like to be notified about new versions and related stuff, you can sign up for e-mail notificatons or join our Telegram - channel. -

- -
- -
-
-

Subscribe to e-mail notifications

-
- - +
+
+
+

Awesome Integration

+

By switching things in the background, the package doesn’t stand in your way. +

+

You can integrate with just about any package.

+
+ + + + + + + + + + + + + + + + + + + + Spatie
-
-

What would you like to be notified about?

-
    -
  • -
  • -
  • -
  • -
-
-
- - -
- - - +
+ - + class="text-indigo-800 font-bold text-xl w-64 text-center py-2 rounded-10 + border-indigo-200 border-2 focus:outline-none focus:border-indigo-600 + hover:border-indigo-600 border-transition">Integration + docs + +
+
+ -