Create New Item
×
Item Type
File
Folder
Item Name
×
Search file in folder and subfolders...
File Manager
/
app
/
Notifications
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace App\Notifications; use Illuminate\Bus\Queueable; use Illuminate\Notifications\Notification; class RecurringInvoiceNotification extends Notification { use Queueable; protected $invoice; /** * Create a new notification instance. * * @return void */ public function __construct($invoice) { $this->invoice = $invoice; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['database']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toDatabase($notifiable) { return [ 'transaction_id' => $this->invoice->id, 'invoice_no' => $this->invoice->invoice_no, 'invoice_status' => $this->invoice->status, 'out_of_stock_product' => ! empty($this->invoice->out_of_stock_product) ? $this->invoice->out_of_stock_product : null, 'subscription_no' => $this->invoice->subscription_no, ]; } }