I am not receiving any email. Please help me out. I have changed the environment properly.
use App\User;
use App\Mail\NotifyEmail;
class Notify extends Command
{
    protected $signature = 'notify:email';
    protected $description = 'Send an email to all the users everyday';
    public function handle()
    {
        $emails = User::pluck('email')->toArray();
        $data = ['title' => 'programming' , 'body' => 'php'];
        foreach($emails as $email){
            Mail::To($email) ->send(new NotifyEmail($data));
        }
    }
}
My kernel.php has :
$schedule->command('notify:email') ->daily();
App\Mail\NotifyEmail.php :
class NotifyEmail extends Mailable
{
    use Queueable, SerializesModels;
    public $details;
    public function __construct($data)
    {
        $this -> details = $data;
    }
    public function build()
    {
        return $this->view('mail', compact(varname: 'details'));
    }
}
mail.blade.php contains {{$details['title']}} and {{$details['body']}}.
 
     
     
    