本文整理匯總了PHP中HomeController::getJsonFeed方法的典型用法代碼示例。如果您正苦於以下問題:PHP HomeController::getJsonFeed方法的具體用法?PHP HomeController::getJsonFeed怎麽用?PHP HomeController::getJsonFeed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類HomeController
的用法示例。
在下文中一共展示了HomeController::getJsonFeed方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: function
});
/*
|--------------------------------------------------------------------------
| 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);
});