PHP code example of aljawad / laravel-multidomain

1. Go to this page and download the library: Download aljawad/laravel-multidomain 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/ */

    

aljawad / laravel-multidomain example snippets


//$app = new Illuminate\Foundation\Application(
$app = new Aljawad\Multidomain\Foundation\Application(
    realpath(__DIR__.'/../')
);

use Aljawad\Multidomain\Foundation\Http\Kernel as HttpKernel;
//use Illuminate\Foundation\Http\Kernel as HttpKernel;

use Aljawad\Multidomain\Foundation\Console\Kernel as ConsoleKernel;
#use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

        //Illuminate\Queue\QueueServiceProvider::class,
        Aljawad\Multidomain\Queue\QueueServiceProvider::class,

php artisan vendor:publish 

php artisan domain:add site1.com 

php artisan domain:add site2.com 

 php artisan list --domain=site1.com 
 

php artisan domain:remove site2.com 

php artisan domain:update_env --domain_values='{"TOM_DRIVER":"TOMMY"}'