reactionId = $reactionId; } /** * Execute the job. * * @return void */ public function handle() { \Log::info('SendReservationCreatedMail: Starting to process job', ['reaction_id' => $this->reactionId]); // Fetch the reaction from the database $reaction = \Cog\Laravel\Love\Reaction\Models\Reaction::findOrFail($this->reactionId); \Log::info('SendReservationCreatedMail: Reaction loaded', ['reaction_id' => $reaction->getId()]); $reacter = $reaction->getReacter()->getReacterable(); \Log::info('SendReservationCreatedMail: Reacter loaded', [ 'reacter_type' => get_class($reacter), 'reacter_id' => $reacter->id, 'reacter_email' => $reacter->email, ]); // Send the email to the reacter (person making the reservation) Mail::to($reacter->email)->send(new ReservationCreatedMail($reaction)); \Log::info('SendReservationCreatedMail: Email sent successfully', ['to' => $reacter->email]); } }