1. Go to this page and download the library: Download rdcstarr/laravel-multisite library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rdcstarr / laravel-multisite example snippets
$_SERVER['MULTISITE'] = [
'production' => [
'sites_path' => '/home/admin/web', // path where all sites are located
'base_path' => '/private', // path to the folder with .env files, e.g. in my case path will be: `/home/admin/web/{site.tld}/private/.env`
'public_path' => '/public_html', // path to the public files, e.g. in my case path will be: `/home/admin/web/{site.tld}/public_html`
],
'local' => [
'sites_path' => '/var/www/html/.subdomains', // path where all sites are located in local development
'base_path' => '/private', // path to the folder with .env files, e.g. in my case path will be: `/var/www/html/.subdomains/{site.tld}/private/.env`
'public_path' => '/public_html', // path to the public files, e.g. in my case path will be: `/var/www/html/.subdomains/{site.tld}/public_html`
],
// List of artisan commands who doesn't