PHP Package: spatie/laravel-multitenancy

Spatie's Laravel Multitenancy package offers streamlined and efficient tenant management for Laravel applications.

Current Version: 4.0.7
Last Updated: 2025-09-26
PHP Requirement: ^8.2
Dependencies:
laravel/framework
illuminate/database
⚠️ To ensure full functionality, the above dependencies might be required.

Package Description

Laravel Multitenancy by Spatie simplifies the process of managing tenants within your Laravel project. With this package, you can effortlessly handle multiple tenants, each with their database, all within a single Laravel application. It provides a flexible and robust solution for implementing multitenancy, enabling you to focus on building your application rather than managing tenants.

📦 Show all available classes🔗 View on GitHub

Download Latest Version: 4.0.7

Download Download v4.0.7

Previous Versions

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php
// Example from PHPlibraries.com
require_once 'libs/spatie/laravel-multitenancy/4.0.7/loader.php';
require_once 'libs/laravel/framework/{lib_version}/loader.php';
require_once 'libs/illuminate/database/12.33.0/loader.php';

use Spatie\Multitenancy\Actions\MakeQueueTenantAwareAction;
use Illuminate\Database\DatabaseManager;
use Illuminate\Database\Connection;

$obj = new MakeQueueTenantAwareAction();
echo '✅ Test OK: ' . get_class($obj);
?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.

Community Discussion

Ask questions, share tips, or report issues below.