Files
exchange-2.0/app/Classes/Modules/Bookings/Services/ChecksIfBookingMarkingExists.php
T
2020-12-08 16:21:53 +08:00

28 lines
508 B
PHP

<?php
namespace App\Classes\Modules\Bookings\Services;
use App\Models\Booking;
class ChecksIfBookingMarkingExists
{
/** @var Booking */
private $repository;
/**
* ChecksIfBookingMarkingExists constructor.
* @param Booking $repository
*/
public function __construct(Booking $repository)
{
$this->repository = $repository;
}
public function execute(int $marking): bool {
return $this->repository->where('marking', $marking)->exists();
}
}