Replies: 1 comment 2 replies
-
could you fix the formatting of the BookingCanceled thing? also add the prefix php (use ``` php ) on both. then we can read the code... |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am trying to build a appointment booking app
I have a function in my controller called cancelbooking function which will change the status of the booking from 0 to 1 will change that from from active bookings to cancel also will delete the related bookings in checkin table and also put back the canceled time back to available appointments by changing the status from 0 to 1. Now I Want to send a notification to the users that the appointment got canceled
Here is the code
use ``` php
`<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Illuminate\Queue\SerializesModels;
class BookingCanceled extends Notification
{
use Queueable, SerializesModels;
}
`
When I checked the logs then this is what I see. I do not know why $bookings is undefined
[2024-02-21 04:21:23] local.INFO: Booking ID: 141
[2024-02-21 04:21:23] local.INFO: Booking found: 141
[2024-02-21 04:21:23] local.INFO: Booking status updated: 1
[2024-02-21 04:21:24] local.INFO: Checkinout record deleted for booking: 141
[2024-02-21 04:21:24] local.INFO: Status updated in the times table for appointment: 350
[2024-02-21 04:21:24] local.INFO: Exception caught: Undefined variable $booking
Beta Was this translation helpful? Give feedback.
All reactions