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/SBogers10/immoginis.komma.pro/app/commands/PropertyImportCommand.php
<?php

use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;

class PropertyImportCommand extends Command
{

    /**
     * The console command name.
     *
     * @var string
     */
    protected $name = 'property:import';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description.';

    private $propertyImportService;

    /**
     * PropertyImportCommand constructor.
     */
    public function __construct()
    {
        parent::__construct();

    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function fire()
    {

        $pis = App::make('\Komma\Kms\Properties\propertyImportService');

        try{
            $pis->import();
        }
        catch(\Exception $e){
            \Log::info($e->getMessage());
            \Log::info('Force hard property import');

            $pisController = App::make('\Komma\Kms\Properties\PropertyController');
            $pisController->deleteAndGetProperties();
        }

    }

    /**
     * Get the console command arguments.
     *
     * @return array
     */
    protected function getArguments()
    {
        return array(//			array('example', InputArgument::REQUIRED, 'An example argument.'),
        );
    }

    /**
     * Get the console command options.
     *
     * @return array
     */
    protected function getOptions()
    {
        return array(//			array('example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null),
        );
    }

}