isaacdew / laravel-fortify-multitenancy
A package that makes it easy to setup subdomain-based multitenancy with Laravel Fortify.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/isaacdew/laravel-fortify-multitenancy
Requires (Dev)
- laravel/fortify: 2.x-dev
 - orchestra/testbench: ^7.4.0
 
This package is auto-updated.
Last update: 2025-10-29 03:12:00 UTC
README
Installation
composer require isaacdew/laravel-fortify-multitenancy
php artisan vendor:publish --tag=laravel-fortify-multitenancy-migrations
Add the SetTenant middleware to the top of the $middleware property in your Kernel.php:
namespace App\Http; use Isaacdew\LaravelFortifyMultitenancy\SetTenant; use Illuminate\Foundation\Http\Kernel as HttpKernel; class Kernel extends HttpKernel { /** * The application's global HTTP middleware stack. * * These middleware are run during every request to your application. * * @var array<int, class-string|string> */ protected $middleware = [ SetTenant::class, // \App\Http\Middleware\TrustHosts::class, \App\Http\Middleware\TrustProxies::class, \Illuminate\Http\Middleware\HandleCors::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class, ...