CakePHP2系を利用して、JSON形式のデータをVIEW側が受け取る方法 環境 CakePHP 2.1.2 PHP 5.3.10 ResponseオブジェクトのbodyにJSONデータをセットしてVIEW側に返却 class HogesController extends AppController { public function hoge() { $this->autoRender = false; $json = array('json_data'=>array('key01'=>'data01', 'key02'=>'data02')); return new CakeResponse(array('body' => json_encode($json))); } } jQuery.ajax() の dataType を 'json' として受け取るデータを JSON データ
This document is for a version of CakePHP that is no longer supported. Please upgrade to a newer release! Pagination¶ class PaginatorComponent(ComponentCollection $collection, array $settings = array())¶ One of the main obstacles of creating flexible and user-friendly web applications is designing an intuitive user interface. Many applications tend to grow in size and complexity quickly, and desig
CakePHPer のための Laravel 入門 - ブログチュートリアル1 - localdiskの続きです。 Postコントローラの作成 cake-to-laravel/app/controllers に 投稿記事(posts)に対するコントローラを作成します。 <?php class PostController extends BaseController { } 全てのコントローラーは BaseController クラスを拡張する必要があります*1。では、一つメソッドを作って呼び出してみましょう。 <?php class PostController extends BaseController { public function getIndex() { // URL を echo する echo Request::url(); } } コントローラを呼び出すのにはルートの
We’re thrilled to announce the Runnable team is joining MuleSoft. This is an incredible opportunity for us to expand our vision of empowering developers to test changes without the infrastructure bottleneck; we couldn’t be more excited to work with MuleSoft to continue our journey. As apart of this transition, we’re shutting down service for all Runnable accounts. To those we had the joy of servin
ちょっと説明用も兼ねて、基本的なsql_dumpエレメントからDebugKit, DataSourceのgetLog()を使った方法まで、まとめました。 sql_dumpエレメントで確認する <?php echo $this->element('sql_dump'); ?> https://github.com/cakephp/cakephp/blob/2.3.6/app/View/Layouts/default.ctp#L60 CakePHPデフォルトのレイアウトであるdefault.ctpからは、この様にSQLダンプ用のエレメントが読み込まれてます。 既に開発が進んでるプロジェクトだったり、配布されてるレイアウトをベースにしていたりすると、sql_dumpエレメントの読み込みが削除されてるかもしれないけど、普通は一番簡単にSQLを確認出来るところです。 if (!class_exis
CakePHP用のケータイ対応ライブラリ「Ktai Library」のバージョン0.1.0がリリースされました Tweet 2009/5/13 水曜日 matsui Posted in ソフト紹介, タレコミ | No Comments » 作者のMASA-Pさんご本人からのタレコミです。 情報提供ありがとうございます。 CakePHP用のケータイ対応ライブラリである「Ktai Library」の新バージョンである0.10がリリースされたとのことです。 → ECWorks Blog 【KtaiLibrary】バージョン0.1.0公開! [blog.ecworks.jp] ダウンロードはこちらから行えます。 → Ktai Library for CakePHP1.2 [blog.ecworks.jp] 今回の目玉はかねてから要望の多かった「セッション対応」を盛り込んだことで、より実用性の高い
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く