Motivacional1Push.php 944 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace App\Notifications\Push\Cliente\Motivacional;
  3. use App\Enums\PushNotificationCategoryEnum;
  4. use App\Enums\PushNotificationTargetEnum;
  5. use App\Models\User;
  6. use App\Notifications\Push\BasePushNotification;
  7. use Illuminate\Database\Eloquent\Collection;
  8. class Motivacional1Push extends BasePushNotification
  9. {
  10. public function label(): string { return 'cliente_motivacional_1'; }
  11. public function title(): string { return 'Sua casa merece cuidado'; }
  12. public function body(): string { return 'E você merece tempo livre.'; }
  13. public function target(): PushNotificationTargetEnum { return PushNotificationTargetEnum::CLIENTE; }
  14. public function category(): PushNotificationCategoryEnum { return PushNotificationCategoryEnum::MOTIVACIONAL; }
  15. public function eligibleUsers(): Collection
  16. {
  17. return User::whereHas('client')
  18. ->where('registration_complete', true)
  19. ->get();
  20. }
  21. }