1. Go to this page and download the library: Download elfsundae/laravel-apps 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/ */
use ElfSundae\Apps\Facades\Apps;
// Get all application URLs
Apps::urls();
// Get all application identifiers
apps()->ids();
// Get URL root for the assets app
apps()->root('assets');
// Get URL domain for the api app
apps()->domain('api');
// Get URL prefix for the admin app
apps()->prefix('admin');
$appId = Apps::id();
$appId = app_id();
if (Apps::id('admin')) {
// Currently requesting admin app
}
if (app_id('web', 'admin')) {
// Currently requesting either web app OR admin app
}