TypeVehicleService.php 314B

12345678910111213141516
  1. <?php
  2. namespace App\Services;
  3. use App\Models\TypeVehicle;
  4. class TypeVehicleService
  5. {
  6. public static function isUsed(TypeVehicle $typeVehicle)
  7. {
  8. return $typeVehicle->vehicles()->exists()
  9. || $typeVehicle->maxVehicles()->exists()
  10. || $typeVehicle->outTransaction()->exists();
  11. }
  12. }