File: D:/HostingSpaces/Eurotools/euro-tools.nl/app/KommaApp/Shop/Notifications/AdminOrderConfirmation.php
<?php
namespace App\KommaApp\Shop\Notifications;
use App\KommaApp\Shop\Checkout\QuotationRequest;
use App\KommaApp\Shop\Orders\Order;
use App\KommaApp\Users\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Support\Collection;
/**
* Class AdminOrderConfirmation
*
* Confirmation to an eurotools admin that a customer did place an order
*
* @package App\KommaApp\Shop\Notifications
*/
class AdminOrderConfirmation extends Notification
{
use Queueable;
/**
* @var Order $order
*/
private $order;
/**
* Create a new notification instance.
*
* @param User $customer
* @param Order $order
*/
public function __construct(Order $order)
{
$this->order = $order;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
$mail = (new MailMessage)
->view('emails.admin.orderConfirmation', [
'order' => $this->order,
'customer' => $this->order->customer
])->subject(__('shop/notifications.admin_order_received.mail_subject'));
return $mail;
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}