| @@ -21,10 +21,11 @@ | ||
| 21 | 21 | $data = request()->all(); | 
| 22 | 22 |          $user = User::where('stripe_id', $data['data']['object']['customer'])->first(); | 
| 23 | 23 |          if ($user) { | 
| 24 | - if ($data['type'] === 'customer.subscription.deleted' || customer.subscription.deleted) | |
| 25 | -            switch ($data['type']) { | |
| 24 | +            if ($data['type'] === 'customer.subscription.deleted' || customer.subscription.deleted) { | |
| 25 | +                        switch ($data['type']) { | |
| 26 | 26 | case "customer.subscription.deleted": | 
| 27 | 27 | $user->role_id = 4; | 
| 28 | + } | |
| 28 | 29 | $user->save(); | 
| 29 | 30 | break; | 
| 30 | 31 | case "invoice.payment_succeeded": |