/**
  * A function used to tweet the details of a Random faucet.
  */
 public function sendRandomFaucetTweet()
 {
     $faucetIds = Faucet::where('id', '>', 0)->pluck('id')->toArray();
     shuffle($faucetIds);
     $randomNumber = array_slice($faucetIds, 0, 1);
     //Obtain a faucet using the random integer.
     $faucet = Faucet::find($randomNumber[0]);
     if ($faucet != null) {
         //Construct a message template based on the random faucet's details.
         $message = "Earn between " . $faucet->min_payout . " and " . $faucet->max_payout . " satoshis every " . $faucet->interval_minutes . " minute/s from " . url('/faucets/' . $faucet->slug) . " for free :).";
         // Send the tweet of the random faucet.
         $this->sendTweet($message);
     }
 }
 public function postResetAll(ResetAllRequest $request)
 {
     $data = $request->all();
     $result = Faucet::where('until', '>', date('Y-m-d H:i:s'))->update(['until' => date('Y-m-d H:i:s')]);
     return Response::json(['message' => 'All faucets reset to current date!!!', 'id' => $data['id']]);
 }