Voucherify phase 2

This commit is contained in:
Dillon
2023-07-17 21:29:19 +08:00
parent 46ae50b569
commit c7927847c4
162 changed files with 6063 additions and 298 deletions
@@ -0,0 +1,27 @@
<?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();
}
}