<?php

namespace App\Console\Commands;

use App\Http\Controllers\ExportToWUController;
use App\Http\Controllers\KontrolaPrijmuDatController;
use Illuminate\Console\Command;

class ExportToWU extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'uploadData:WU';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Upload all data from mqtt_data_request to WU';

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $n = new ExportToWUController();
        $n->requestToWU();
        /**
         * Sice by to mělo mít vlastní command ale...
         */
        $e = new KontrolaPrijmuDatController();
        $e->upozorniEmailem();

        return 'ok';
    }
}
