File: D:/HostingSpaces/egovers/edwingovers.nl/app/KommaApp/Shop/ArtisanCommands/InstallTranslations.php
<?php
namespace App\KommaApp\Shop\ArtisanCommands;
use App\KommaApp\Shop\TranslationInstallationController;
use Illuminate\Console\Command;
class InstallTranslations extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'shop:translations {action?}}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Installs shop translations in resources/lang. If you prefix the command with uninstall it will uninstall them';
/**
* @var TranslationInstallationController $translationInstall
*/
protected $translationInstall;
/**
* Create a new command instance.
*
* @param TranslationInstallationController $controller
*/
public function __construct(TranslationInstallationController $controller)
{
parent::__construct();
$this->translationInstall = $controller;
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$action = $this->argument('action');
if(!$action) $action = null;
switch ($action)
{
case "uninstall":
$this->translationInstall->translationsUninstall($this);
break;
case "installViaCopy":
$this->translationInstall->translations($this, true);
break;
case "install":
default:
$this->translationInstall->translations($this);
}
}
}