<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use Auth;
use Log;
use exception;
use  App\Models\fcmodels\OrganizationUser;
use App\Notifications\NewUserNotify;

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

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Notify created users';

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

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        /*$newusers = OrganizationUser::where('created_at','!=',now())->get();
        if($newusers->count())
        {
            $newusers->map(function($user){
                $messages = null;
                //Log::info($user);
                $user->notify (new NewUserNotify($messages, $user));
            });
        }
        $this->info('Emails sent');
        */
    }
}
