harvyde/multisite

a library for detecting sites / hosts and environments. This library can be useful to build a multisite. Multiple domains pointing to the same application. You can use this class anywhere in your application to serve content based on domain and environment site be being accessed.

Maintainers

Package info

github.com/harvyde/multisite

Homepage

pkg:composer/harvyde/multisite

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2019-04-15 11:49 UTC

This package is auto-updated.

Last update: 2026-03-16 03:40:34 UTC


README

a library for detecting sites / hosts and environments. This library can be useful to build a multisite. Multiple domains pointing to the same application. You can use this class anywhere in your application to serve content based on domain and environment site be being accessed.

usage

    Multisite::setup(
      [
        'site1' => 'yourdomain.com',
        'site2' => 'anotherdomain.com',
      ]
    );
    
    # get current environment
    Multisite::env();
    
    # check environment
    Multisite::is_env('prod');
    Multisite::is_env(['prod', 'new']);

Support and Feedback

If you find a bug, please submit the issue in Github directly. harvyde/multisite Issues