Mail::queue('emails.contact', $data, function ($message) { $message->to('*****@*****.**', 'Connor Smith')->subject('BinaryBTC Contact Form'); }); return array(); }); Route::get('/faq', function () { return View::make('faq'); }); Route::get('/latest_price', function () { if (!Request::ajax()) { App::abort(404); } $latest = DB::table('price_hist')->orderBy('id', 'desc')->first(); return array('price' => number_format($latest->price, 4), 'time' => strtotime($latest->created_at), 'date' => $latest->created_at); }); Route::get('/chart_data', function () { if (!Request::ajax()) { App::abort(404); } return DB::table('price_hist')->select('price as value', 'created_at as date')->remember(0.5)->get(); }); Route::get('/update_price', array('before' => 'internal_only', function () { if (!Cache::has('last_updated_at') || time() - Cache::get('last_updated_at') >= 50) { Cache::forever('last_updated_at', time()); Bitcoin::getLatestPrice(); } })); Route::controller('users', 'UsersController'); Route::controller('withdraw', 'WithdrawController'); Route::controller('blockchain', 'BlockchainController'); Route::controller('bet', 'BetController');