mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
28 lines
508 B
PHP
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();
|
|
}
|
|
|
|
} |