Pass variable to Mail::send() function in Laravel

If you need to pass variables to Mail::send() function in Laravel you can use the following code.

I have passed the subject parameter using the $data array