This commit is contained in:
Marcel Pociot
2020-06-02 16:51:36 +02:00
parent f058ce8c5c
commit 6a47264be9
34 changed files with 661 additions and 9 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Commands;
use Illuminate\Console\Command;
class PublishCommand extends Command
{
protected $signature = 'publish';
protected $description = 'Publish the expose configuration file';
public function handle()
{
$configFile = implode(DIRECTORY_SEPARATOR, [
$_SERVER['HOME'],
'.expose',
'config.php'
]);
if (file_exists($configFile)) {
$this->error('Expose configuration file already exists at '.$configFile);
return;
}
file_put_contents($configFile, file_get_contents(base_path('config/expose.php')));
$this->info('Published expose configuration file to: ' . $configFile);
}
}