![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/rentpix.corals.io/vendor/laravel/envoy/src/Console/ |
<?php namespace Laravel\Envoy\Console; use Symfony\Component\Console\Command\Command as SymfonyCommand; use Symfony\Component\Console\Input\InputArgument; class InitCommand extends SymfonyCommand { use Command; /** * Configure the command options. * * @return void */ protected function configure() { $this ->setName('init') ->setDescription('Create a new Envoy file in the current directory.') ->addArgument('host', InputArgument::REQUIRED, 'The host server to initialize with.'); } /** * Execute the command. * * @return int */ protected function fire() { if (file_exists(getcwd().'/Envoy.blade.php')) { $this->output->writeln('<error>Envoy file already exists!</error>'); return 1; } file_put_contents(getcwd().'/Envoy.blade.php', "@servers(['web' => '".$this->input->getArgument('host')."']) @task('deploy') cd /path/to/site git pull origin master @endtask "); $this->output->writeln('<info>Envoy file created!</info>'); return 0; } }