PHP code example of rdcstarr / laravel-multisite

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 
properties
	server {
		listen 80;
		server_name example.com;

		root /home/admin/web/{core.local}/public;

		index index.php index.html index.htm;

		location / {
			try_files $uri $uri/ /index.php?$query_string;
		}

		location ~ \.php$ {
			
bash
php artisan multisite:list
bash
php artisan multisite:migrate [--force] [--seed] [--seeder]
bash
php artisan multisite:migrate-fresh [--force] [--seed] [--seeder]
bash
php artisan multisite:queue
bash
php artisan multisite:schedule-run
bash
php artisan multisite:seed [--force] [--class]