Files
exchange-2.0/app/Classes/Modules/Bookings/Services/ChecksIfBookingMarkingExists.php
T
CheeSiong c3f153fe4b Create Booking Logic Class
Update Booking Logic Class
 Delete Booking Logic Class
2020-12-04 09:49:47 +08:00

27 lines
507 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();
}
}