Cron Jobs, Reminder, Fonts, Members / Wizard / Price, Credit and Promotion
This commit is contained in:
parent
a0f4eda6ea
commit
6167273a48
204 changed files with 8746 additions and 215 deletions
|
|
@ -3,6 +3,7 @@ namespace App\Services;
|
|||
|
||||
|
||||
use App\User;
|
||||
use App\Models\PromotionUser;
|
||||
|
||||
class UserService
|
||||
{
|
||||
|
|
@ -18,4 +19,15 @@ class UserService
|
|||
return $confirmation_code;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static function hasActivePromotion($user) {
|
||||
$promotion_users = PromotionUser::where('user_id', $user->id)->where('active', 1)->whereNull('user_deleted_at')->get();
|
||||
foreach($promotion_users as $promotion_user){
|
||||
if($promotion_user->promotion_admin->isActive()){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue