/**
  * Handle the event.
  *
  * @param  CheckoutEvent  $event
  * @return void
  */
 public function handle(CheckoutEvent $event)
 {
     /*
     *  public function sendEmailReminder(Request $request, $id)
         {
             $user = User::findOrFail($id);
     
             Mail::send('emails.reminder', ['user' => $user], function ($m) use ($user) {
        $m->from('*****@*****.**', 'Your Application');
     
        $m->to($user->email, [=´çpoktfçfgnf '$user->name)->subject('Your Reminder!');
             });
         }kkkkmolpkiolo.;
     
     
     
     
     [
     */
     $user = $event->getUser();
     $order = $event->getOrder();
     Mail::send('emails.checkout', compact('user', 'order'), function ($message) use($order, $user) {
         $message->from('*****@*****.**', 'Code Commerce');
         $message->to($user->email, $user->name);
         $message->subject('Code Commerce | Seu Pedido');
     });
 }
Пример #2
0
 public function handle(CheckoutEvent $event)
 {
     echo "Evento Disparado";
     // Colocar aqui o processo de Envio de e-mail
     $user = $event->getUser();
     // recuperando o usuario passado para o checkoutEvento
 }
Пример #3
0
 /**
  * Handle the event.
  *
  * @param  CheckoutEvent  $event
  * @return void
  */
 public function handle(CheckoutEvent $event)
 {
     $order = $event->getOrder();
     $user = $order->user;
     Mail::send('emails.checkout', compact('order', 'user'), function ($message) use($order, $user) {
         $message->to($user->email, $user->name)->subject('Detalhes do pedido');
     });
 }
Пример #4
0
 /**
  * Handle the event.
  *
  * @param  CheckoutEvent $event
  * @return void
  */
 public function handle(CheckoutEvent $event)
 {
     $user = $event->getUser();
     $order = $event->getOrder();
     return $this->mailer->send('emails.checkout', ['user' => $user, 'order' => $order], function ($message) use($user) {
         $message->to($user->email, $user->name)->subject("{$user->name}, seu pedido foi realizado com sucesso!");
     });
 }
Пример #5
0
 /**
  * Handle the event.
  *
  * @param  CheckoutEvent  $event
  * @return void
  */
 public function handle(CheckoutEvent $event)
 {
     $user = $event->getUser();
     $order = $event->getOrder();
     Mail::send('emails.checkout', array('user' => $user, 'order' => $order), function ($message) use($user) {
         $message->to($user->email, $user->name)->subject('Checkout!');
     });
 }
 /**
  * Handle the event.
  *
  * @param  CheckoutEvent  $event
  * @return void
  */
 public function handle(CheckoutEvent $event)
 {
     $user = $event->getUser();
     $order = $event->getOrder();
     Mail::send('emails.store.checkout', ['user' => $user, 'order' => $order], function ($m) use($user) {
         $m->from('*****@*****.**', 'Loja Laravel');
         $m->to($user->email, $user->name)->subject('Pedido Recebido!!');
     });
 }
 /**
  * Handle the event.
  *
  * @param  CheckoutEvent  $event
  * @return void
  */
 public function handle(CheckoutEvent $event)
 {
     $user = $event->getUser();
     $order = $event->getOrder();
     Mail::send('emails.checkout', ['user' => $user, 'order' => $order], function ($m) use($user, $order) {
         $m->to($user->email, $user->name)->subject('Checkout from CodeCommerce');
         /*$m->from('*****@*****.**', 'CodeCommerce')->to($user->email, $user->name)->subject('Checkout from CodeCommerce');*/
     });
 }
 /**
  * Handle the event.
  *
  * @param  CheckoutEvent  $event
  * @return void
  */
 public function handle(CheckoutEvent $event)
 {
     echo "evento checkout - listener - send email";
     $order = $event->getOrder();
     // dd($order);
     Mail::send('store.checkout_mail', compact('order'), function ($message) use($order) {
         $message->from('*****@*****.**', 'CODE Commerce');
         $message->to($order->user->email, $order->user->name)->subject('compra realizada - pedido n.' . $order->id);
     });
 }
 /**
  * Handle the event.
  *
  * @param  CheckoutEvent  $event
  * @return void
  */
 public function handle(CheckoutEvent $event)
 {
     $user = $event->getUser();
     $order = $event->getOrder();
     Mail::send('emails.reminder_purchase', compact('user', 'order'), function ($message) use($order, $user) {
         $message->from('*****@*****.**', 'Code Commerce');
         $message->to($user->email, $user->name);
         $message->subject('Code Commerce | Recebemos seu Pedido');
     });
 }
Пример #10
0
 /**
  * Handle the event.
  *
  * @param  CheckoutEvent  $event
  * @return void
  */
 public function handle(CheckoutEvent $event)
 {
     $user = $event->getUser();
     $order = $event->getOrder();
     #$order_items = OrderItem::find($order->id);
     #dd($order_items);
     Mail::send('emails.checkout', ['user' => $user, 'order' => $order], function ($message) use($user, $order) {
         $message->from('*****@*****.**', 'CodeCommerce');
         $message->to($user->email, $user->name)->subject("Pedido #{$order->id} - Checkout");
     });
 }
Пример #11
0
 /**
  * Handle the event.
  *
  * @param  CheckoutEvent  $event
  * @return void
  */
 public function handle(CheckoutEvent $event)
 {
     $order = $event->getOrder();
     $user = $event->getUser();
     /**
      * Sending email.
      */
     Mail::send('emails.checkout-client', ['order' => $order, 'user' => $user], function ($message) use($user) {
         $message->to($user->email, $user->name)->subject('Pedido!');
     });
 }
 /**
  * Handle the event.
  *
  * @param  CheckoutEvent  $event
  * @return void
  */
 public function handle(CheckoutEvent $event)
 {
     echo "<script>alert('Disparando Evento!!');</script>";
     $user = $event->getUser();
     $order = $event->getOrder();
     Mail::send('emails.checkout', ['user' => $user, 'order' => $order], function ($m) use($user) {
         $m->from('*****@*****.**', 'Seu Pedido!');
         $m->to($user->email, $user->name)->subject('Pedido Recebido!');
     });
     echo "<script>alert('Evento disparado!!');</script>";
 }
 public function handle(CheckoutEvent $event)
 {
     // $event->getUser() pega o user que eu passei para o meu evento
     // o user foi passado ao CheckoutEvent através do CheckoutController,
     // no momento em que eu usei o event() no CheckoutController
     $user = $event->getUser();
     $order = $event->getOrder();
     // atribui a $orderItems[] os nomes dos produtos da order
     foreach ($order->items as $item) {
         $orderItems[] = $item->product->name;
     }
     // separo os items do $orderItems por virgulas e atribuo eles a variavel $items
     $items = implode(', ', $orderItems);
     $data = ['user' => $user, 'order' => $order, 'items' => $items, 'email' => '*****@*****.**'];
     Mail::send('emails.checkout', $data, function ($message) use($data) {
         $message->to('*****@*****.**', 'CodeCommerce')->subject('Order Details: ' . $data['items'])->replyTo($data['email']);
     });
 }
 /**
  * Handle the event.
  *
  * @param  CheckoutEvent  $event
  * @return void
  */
 public function handle(CheckoutEvent $event)
 {
     //
     Mail::send('checkout.email', ['user' => $event->getUser(), 'order' => $event->getOrder()], function ($m) use($event) {
         $m->from('*****@*****.**', 'Code Commerce');
         $m->to($event->getUser()->email, $event->getUser()->name)->subject('Code Commerce - Seu pedido #' . $event->getOrder()->id . ' foi criado');
     });
 }
 /**
  * Handle the event.
  *
  * @param  SomeEvent  $event
  * @return void
  */
 public function handle(CheckoutEvent $event)
 {
     //echo "Evento Disparado";
     $user = $event->getUser();
 }
Пример #16
0
 /**
  * Handle the event.
  *
  * @param  CheckoutEvent  $event
  * @return void
  */
 public function handle(CheckoutEvent $event)
 {
     $user = $event->getUser();
     $order = $event->getOrder();
 }
Пример #17
0
 /**
  * Handle the event.
  *
  * @param  CheckoutEvent  $event
  * @return void
  */
 public function handle(CheckoutEvent $event)
 {
     Mail::send('emails.email-checkout', ['user' => $event->getUser(), 'order' => $event->getOrder()], function ($message) use($event) {
         $message->to($event->getUser()->email, $event->getUser()->name)->subject('E-mail teste enviado através do laravel');
     });
 }