public function postAcceptedSign($md5)
{
$notif = CustomerOrder::where('sign_link', '=', $md5)->get();
Mail::send('emails.signed-notif', ['order_num' => $notif[0]->order_number], function ($m) {
$m->to('mis@qdf-phils.com', '')->subject('Customer Order '.$notif[0]->order_number.' is now signed');
});
Session::flash('alert-success', 'Order Signed.');
return Redirect::to('home');
}
I am getting Undefined variable: notif
which points to this
Mail::send('emails.signed-notif', ['order_num' => $notif[0]->order_number], function ($m) {
$m->to('mis@qdf-phils.com', '')->subject('Customer Order '.$notif[0]->order_number.' is now signed');
});
Why I get undefined variable in $notif[0]
where as you can see my variable is already defined above? Is this because the starting Mail::send
is a separate block that It can't see other variables?