}); Route::filter('internal_only', function () { if ($_SERVER['REMOTE_ADDR'] != $_SERVER['SERVER_ADDR']) { die(var_dump($_SERVER['REMOTE_ADDR'])); } }); App::before(function ($request) { if ($request->getMethod() === 'POST') { Route::callRouteFilter('custom_csrf', array(), '', $request); } }); $btc_price = Bitcoin::toUSD(); View::share('btc_price', $btc_price); $updated_at = strtotime(DB::table('price_hist')->orderBy('id', 'desc')->pluck('created_at')); View::share('updated_at', $updated_at); Bet::checkExpired(); Route::get('logout', function () { Auth::logout(); return Redirect::to('/'); }); Route::get('/', function () { $prices = DB::table('price_hist')->get(); $bets = Bet::available()->paginate(4); $server_time = date('H:i:s'); return View::make('hello', compact('server_time', 'bets', 'prices')); }); Route::post('/contact/submit', function () { $data = array('from' => Input::get('email'), 'body' => Input::get('message')); Mail::queue('emails.contact', $data, function ($message) { $message->to('*****@*****.**', 'Connor Smith')->subject('BinaryBTC Contact Form'); });