mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
28 lines
611 B
PHP
28 lines
611 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Milestones\Services;
|
|
|
|
use App\Models\MilestoneProgress;
|
|
|
|
class CheckIfMilestoneProgressExists
|
|
{
|
|
|
|
/** @var MilestoneProgress */
|
|
private $repository;
|
|
|
|
|
|
/**
|
|
* CheckIfMilestoneProgressExists constructor.
|
|
* @param MilestoneProgress $repository
|
|
*/
|
|
public function __construct(MilestoneProgress $repository)
|
|
{
|
|
$this->repository = $repository;
|
|
}
|
|
|
|
public function execute(int $user_id, int $milestone_id): bool {
|
|
return $this->repository->where('user_id', $user_id)->where('milestone_id', $milestone_id)->exists();
|
|
}
|
|
|
|
}
|