PHPackages                             apsg/multisite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. apsg/multisite

ActiveLibrary[Framework](/categories/framework)

apsg/multisite
==============

Package for laravel multisite feature (multiple installations)

0.1.0(6y ago)275MITPHPCI failing

Since Dec 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/apsg/Multisite)[ Packagist](https://packagist.org/packages/apsg/multisite)[ Docs](https://github.com/apsg/multisite)[ RSS](/packages/apsg-multisite/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Multisite
=========

[](#multisite)

[![Latest Version on Packagist](https://camo.githubusercontent.com/20135c0bd4a1a2059c30b1d55539b272dadfe3bbeba3c149c97bbefd4a721cf1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617073672f6d756c7469736974652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/apsg/multisite)[![Total Downloads](https://camo.githubusercontent.com/ee6bde7c79e4ac9e8233535c0f0d3eee63c17a7c36bdd6707e7874da535d1f54/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617073672f6d756c7469736974652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/apsg/multisite)[![Build Status](https://camo.githubusercontent.com/d39352af39c1e85b972c59b1216fa004a1431398e6c59b1d54f9796814b84847/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f617073672f6d756c7469736974652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/apsg/multisite)[![StyleCI Status](https://camo.githubusercontent.com/f6743dbf057a421703917dbff112bbdb2629d17aeb2609876618ffdd30f9a141/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3232383031393134372f736869656c64)](https://styleci.io/repos/228019147)

Package for managing multiple installations of the same code base. It gives the ability to change the views depending on the "domain" but preserving the backend core the same.

It also lets you to define domain-specifig config.

Installation
------------

[](#installation)

Via Composer

```
composer require apsg/multisite
```

Usage
-----

[](#usage)

After the installation:

##### Add your domain to your `.env` file, i.e.:

[](#add-your-domain-to-your-env-file-ie)

```
MULTISITE_DOMAIN=test

```

##### Add view folder

[](#add-view-folder)

Create new view folder for your domain:

```
mkdir resources/views/test
```

And that's it! From now on the Laravel's view engine would look for view files in main view directory (`resources/views/`) as well as in domain-specific directory (`resources/views/test` in the example above).

### Config files and helpers

[](#config-files-and-helpers)

The package provides helper Facade through which one can access domain-specific configurations. One can publish default config file using:

```
php artisan vendor:publish --tag=multisite.config
```

The helper:

```
\Multisite::config('some.key');
```

would return config equivallent to:

```
config('multisite.{current_domain}.some.key');
```

##### Current domain helper

[](#current-domain-helper)

To check current domain use the Facade helper:

```
\Multisite::domain();
```

Multisite assets
----------------

[](#multisite-assets)

To compile your assets in your `webpack.mix.js` add something like that:

```
// ----- MULTISITE -----------------
let domains = [
    'site1',
    'site2'
];

for (let domain of domains) {
    mix.js('resources/assets/js/' + domain + '.js', 'public/js', domain + '.js')
        .sass('resources/assets/sass/' + domain + '.scss', 'public/css', domain + '.css');
}
```

This will search automatically for files `resources/js/{domain}.js` and `resources/sass/{domain}.scss`, compile them and move them to directories `public/js/{domain}.js` and `public/css/{domain}.css` respectively.

Then one can use helpers provided with this package to automagically load in your layout file only domain-related files:

```

```

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

license. Please see the [license file](license.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2342d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e36c1cb8ed85fdfb1c40d47597ad48efeb1858f76edc205481409cc0d539644c?d=identicon)[Gacek](/maintainers/Gacek)

---

Top Contributors

[![apsg](https://avatars.githubusercontent.com/u/3952574?v=4)](https://github.com/apsg "apsg (28 commits)")

---

Tags

laravelmultisite

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/apsg-multisite/health.svg)

```
[![Health](https://phpackages.com/badges/apsg-multisite/health.svg)](https://phpackages.com/packages/apsg-multisite)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M674](/packages/laravel-socialite)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M225](/packages/laravel-horizon)[laravel/ui

Laravel UI utilities and presets.

2.7k134.9M601](/packages/laravel-ui)[laravel/sail

Docker files for running a basic Laravel application.

1.9k186.9M1.0k](/packages/laravel-sail)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
