|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /var/www/nikkilgupta.edukrypt.in/vendor/laravel/sail/src/Console/ |
Upload File : |
<?php
namespace Laravel\Sail\Console;
use Illuminate\Console\Command;
use Laravel\Sail\Console\Concerns\InteractsWithDockerComposeServices;
class AddCommand extends Command
{
use InteractsWithDockerComposeServices;
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'sail:add
{services? : The services that should be added}
';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Add a service to an existing Sail installation';
/**
* Execute the console command.
*
* @return int|null
*/
public function handle()
{
if ($this->argument('services')) {
$services = $this->argument('services') == 'none' ? [] : explode(',', $this->argument('services'));
} elseif ($this->option('no-interaction')) {
$services = $this->defaultServices;
} else {
$services = $this->gatherServicesInteractively();
}
if ($invalidServices = array_diff($services, $this->services)) {
$this->error('Invalid services ['.implode(',', $invalidServices).'].');
return 1;
}
$this->buildDockerCompose($services);
$this->replaceEnvVariables($services);
$this->configurePhpUnit();
$this->info('Additional Sail services installed successfully.');
$this->prepareInstallation($services);
}
}