Parcourir la source

add idle

master
Amirul Anwar il y a 1 semaine
Parent
révision
b7713df87d
1 fichiers modifiés avec 1 ajouts et 8 suppressions
  1. 1
    8
      app/Console/Commands/ScrapBookingUserId.php

+ 1
- 8
app/Console/Commands/ScrapBookingUserId.php Voir le fichier

@@ -33,6 +33,7 @@ class ScrapBookingUserId extends Command
33 33
 
34 34
         while(true){
35 35
             $bookings = Booking::where('user_id',null)->get();
36
+            return $this->info('Idle');
36 37
             foreach ($bookings as $booking) {
37 38
                 // Find the user that matches the email in the booking
38 39
                 $user = User::where('email', $booking->contact_email)->first();
@@ -41,14 +42,6 @@ class ScrapBookingUserId extends Command
41 42
                     // Update the user_id in the booking record
42 43
                     $booking->user_id = $user->id;
43 44
                     
44
-                    // // Check if the user is an agent
45
-                    // $agent = Agent::where('user_id', $user->id)->first();
46
-                    // if ($agent) {
47
-                    //     $booking->agent_id = $agent->id;
48
-                    //     $booking->agent_code = $agent->code;
49
-                    // }
50
-        
51
-                    // Save the updated booking
52 45
                     $booking->save();
53 46
                 }
54 47
             }

Chargement…
Annuler
Enregistrer