public function tenant(Website $website = null): ?Website
    {
        if ($website !== null) {
            $this->app->instance(Tenant::class, $website);

            $this->emitEvent(new Events\Websites\Switched($website));

            return $website;
        }

        return $this->app->make(Tenant::class);
    }
public function tenant(Website $website = null): ?Website
    {
        if ($website !== null) {
            $this->app->instance(Tenant::class, $website);

            $this->emitEvent(new Events\Websites\Switched($website));

            return $website;
        }

        return $this->app->make(Tenant::class);
    }
public function tenant ( Website $ website = null ) : ? Website { if ( $ website !== null ) { $ this -> app -> instance ( Tenant :: class , $ website ) ; $ this -> emitEvent ( new Events \ Websites \ Switched ( $ website ) ) ; return $ website ; } return $ this -> app -> make ( Tenant :: class ) ; }
Get or set current tenant.

@param Website|null $website
@return Tenant|null
Get or set current tenant .