I tried to to send email to admin when user register to my application
I tried these code :
$admin = Admin::where('is_admin', 3)->get();
Mail::send('emails.notfyNewUser', $data , function ($message) use($admin) {
$message->from('test@test.org','test');
$message->to($admin->email);
$message->subject('test');
});
And got this error :
Property [email] does not exist on this collection instance.
And this is my collection result via dd for $admin : Image