Skip to content

A simple package for building applications with subdomain-based multitenancy in Laravel.

License

Notifications You must be signed in to change notification settings

isaacdew/laravel-fortify-multitenancy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-fortify-multitenancy

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,
        ...

About

A simple package for building applications with subdomain-based multitenancy in Laravel.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages