}); /* |-------------------------------------------------------------------------- | CSRF Protection Filter |-------------------------------------------------------------------------- | | The CSRF filter is responsible for protecting your application against | cross-site request forgery attacks. If this special token in a user | session does not match the one given in this request, we'll bail. | */ Route::filter('csrf', function () { if (Session::token() != Input::get('_token')) { throw new Illuminate\Session\TokenMismatchException(); } }); View::composer('layouts.main', function ($view) { $menu_pages = Post::where('type', 'page')->where('show_menu', 1)->get(); $view->with('menu_pages', $menu_pages); $home_control = new HomeController(); $ltc_usd = $home_control->getJsonFeed('ltc_usd'); $btc_usd = $home_control->getJsonFeed('btc_usd'); //echo "<pre>ltc_usd: "; print_r($ltc_usd); echo "</pre>"; exit; $ltc_usd = $ltc_usd['last']; $btc_usd = $btc_usd['last']; $view->with('btc_usd', $btc_usd); $view->with('ltc_usd', $ltc_usd); //get all locales $locales = Config::get('app.locales'); $view->with('locales', $locales); });