Пример #1
0
 function sucess($token)
 {
     $product_token = product_token::where('order_token', $token)->get();
     //dd($product_token);
     foreach ($product_token as $orders) {
         $orders->order_info = true;
         $orders->save();
     }
     Mail::send(['text' => 'mailse'], ['user' => $token], function ($m) {
         $m->to('*****@*****.**', 'schoolboy')->subject('Your Reminder!');
     });
     Mail::send(['text' => 'mailse'], ['user' => $token], function ($m) {
         $m->to('*****@*****.**', 'schoolboy')->subject('Your Reminder!');
     });
     return view('sucess');
     //$loginfo=Session::put('loginfo');
 }
Пример #2
0
 function sucess($token)
 {
     $product_token = product_token::where('order_token', $token)->get();
     //dd($product_token);
     $order_id = "";
     foreach ($product_token as $orders) {
         $order_id = $orders->order_id;
         $orders->order_info = 1;
         $orders->save();
     }
     $item_id = array();
     $items = order::where('order_id', $order_id)->get();
     foreach ($items as $item) {
         array_push($item_id, $item->item_id);
     }
     $order_address = order_address::where('order_id', $order_id)->get();
     Mail::send(['text' => 'mailse'], ['address' => $order_address, 'item' => $item_id], function ($m) {
         $m->to('*****@*****.**', 'schoolboy')->subject('Your Reminder!');
     });
     Mail::send(['text' => 'mailse'], ['address' => $order_address, 'item' => $item_id], function ($m) {
         $m->to('*****@*****.**', 'schoolboy')->subject('Your Reminder!');
     });
     return view('sucess');
     //$loginfo=Session::put('loginfo');
 }