<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use App\Modules\Bookings\TaskFeedback;
//use \Mail;



class EmailTest extends Command
{
    /**
     * The console command name.
     *
     * @var string
     */
    protected $name = 'test:email {from} {to}';
    protected $signature ='test:email {from} {to}';
    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Send a test email {from} {to}';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $from = $this->argument('from');
        $to = $this->argument('to');
            Mail::send(
                'emails.invoice', ['content' => 'this is a test '],
                function ($message) use ($to, $from) {
                    $message->from($from, $from)->to($to)->subject('TEST-TEST-TEST');
            });
    }
}



                
