mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-25 15:24:21 +00:00
added vue time ago component
added custom field for booking updated notification updated fetch notification on frontend
This commit is contained in:
@@ -13,16 +13,18 @@ use App\Booking;
|
||||
class BookingUpdated extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
protected $booking;
|
||||
protected $details;
|
||||
protected $link;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Booking $booking)
|
||||
public function __construct($details, $link)
|
||||
{
|
||||
$this->booking = $booking;
|
||||
$this->details = $details;
|
||||
$this->link = $link;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -36,24 +38,11 @@ class BookingUpdated extends Notification
|
||||
return ['database', 'broadcast'];
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Get the mail representation of the notification.
|
||||
// *
|
||||
// * @param mixed $notifiable
|
||||
// * @return \Illuminate\Notifications\Messages\MailMessage
|
||||
// */
|
||||
// public function toMail($notifiable)
|
||||
// {
|
||||
// return (new MailMessage)
|
||||
// ->line('The introduction to the notification.')
|
||||
// ->action('Notification Action', url('/'))
|
||||
// ->line('Thank you for using our application!');
|
||||
// }
|
||||
|
||||
public function toDatabase($notifiable)
|
||||
{
|
||||
return [
|
||||
'booking_id' => $this->booking->id
|
||||
'details' => $this->details,
|
||||
'link' => $this->link
|
||||
];
|
||||
}
|
||||
|
||||
@@ -66,14 +55,16 @@ class BookingUpdated extends Notification
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
return [
|
||||
'booking' => $this->booking,
|
||||
'details' => $this->details,
|
||||
'link' => $this->link
|
||||
];
|
||||
}
|
||||
|
||||
public function toBroadcast($notifiable)
|
||||
{
|
||||
return new BroadcastMessage([
|
||||
'booking' => $this->booking,
|
||||
'details' => $this->details,
|
||||
'link' => $this->link
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user