I want to sent thanks mail when users regist our service.
But, This code is error Undefined variable: fhbvuileb in $message->to($fhbvuileb).
Help ME!!!
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use App\User;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Mail;
class RegisterController extends Controller
{
/** ~~~ **/
protected function create(array $data)
{
$fhbvuileb = $data['email'];
Mail::send('emails.user_register', ["message" => "Hello!"], function($message) {
$message->to($fhbvuileb)
->subject("Thank you!!!");
});
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
]);
}
}