mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Voucherify phase 2
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user