function signal_login_upcoming_auction(Auction $auction)
{
    $data = [];
    if (Auth::check()) {
        $user = Auth::user();
        $user->isPlayer();
        // do this to bind player id into user object
        $data['data-player_id'] = $user->player_id;
        $data['data-auction_id'] = $auction->id;
        if ($auction->reminding($user)) {
            return prompt_upcoming_login('', '<i class="fa fa-check"></i> Reminder Set', "We will definitely make you aware!", $data, 'reminders');
        } else {
            return prompt_upcoming_login('', '<i class="fa fa-clock-o"></i> Remind me', "Let's make sure you know about it!", $data, 'reminders');
        }
    } else {
        return prompt_upcoming_login('', '<i class="fa fa-clock-o"></i> Remind me', "Let's make sure you know about it!");
    }
}
 public function index(Request $request)
 {
     $auction = Auction::find(1);
     $auction2 = Auction::find(2);
     $auction2->reset();
     $auction->reset();
     //        $numbers = [
     //            '0209440989',
     //            '0240084611',
     //            '0547480586',
     //            '0501373573',
     //            '0546939750'
     //        ];
     //        for($i = 0; $i <= 0; ++$i)
     //        {
     //            $user = User::find(2);
     //            $user->phone = $numbers[$i];
     //
     //            $message = 'Good morning from MediBig.com. Check out our coming soon page at Medibig.com! Regards, Technical Team!';
     //            try{
     //                $response = $user->sendSmsMessage($message, app('App\MediBig\Notifications\SmsGateways\SmsGatewayInterface'));
     //                //dd($response);
     //                //throw new UndeliveredSmsException($user->phone);
     //            }
     //            catch(UndeliveredSmsException $e)
     //            {
     //                //dd($e);
     //            }
     //        }
     //        $amount = new Money(500);
     //
     //        $reference = 'bright123';
     //
     //        $provider = MobileMoneyPayment::MOBILEMONEYPAYMENT_VODAFONE;
     //
     //
     //        $mobileMoney = new MobileMoneyPayment($amount,$reference, $provider);
     //
     //        $player = new Player($this->userRepository->find(2));
     //
     //        $emailNotifier = new EmailNotification($player->getEmail(),
     //            'emails.payment',['first_name' => $player->getName()],null, 'Payment Confirmation');
     //
     //        $paymentTransaction = new PaymentTransaction($mobileMoney, $emailNotifier, $player);
     //
     //        if($paymentTransaction->execute())
     //        {
     //            echo 'Transaction successful';
     //        }
     //        else
     //            echo 'Something went wrong';
     //        $data = [
     //            'first_name' => 'Bright',
     //            'last_name' => 'Antwi',
     //            'username' => 'bright',
     //            'email' => '*****@*****.**',
     //            'role' => User::USER_ADMINISTRATOR,
     //            'password' => md5('bright'),
     //            'status' => User::USER_STATUS_ACTIVE
     //        ];
     //
     //
     //        $this->userRepository->create($data);
     //
     //        return 'User created!';
 }
 /**
  * @param $auctionId
  * @return null|Auction
  */
 public function findLive($auctionId)
 {
     $auction = Auction::where('id', $auctionId)->whereIn('status', Auction::liveStatus())->get();
     if ($auction->count() != 0) {
         return $auction->first();
     } else {
         return null;
     }
 }