HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/fire-tech/fire-tech.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);
        }
    }
}