質問編集履歴

1

コントローラのアクションのコード追加

2016/08/09 05:22

投稿

kosuke4649
kosuke4649

スコア12

test CHANGED
File without changes
test CHANGED
@@ -53,3 +53,87 @@
53
53
 
54
54
 
55
55
  どなたか解決方法をご存知の方がいらっしゃいましたら、教えていただけると幸いです。
56
+
57
+
58
+
59
+ 追記
60
+
61
+ ichiran_controllerは、以下のようにコーディングして、
62
+
63
+ index関数で一覧を表示する処理を行うようにしております。
64
+
65
+
66
+
67
+ ```php
68
+
69
+ class ichiranController extends AppController {
70
+
71
+
72
+
73
+ public $uses = array('ichiran', 'makers', 'users');
74
+
75
+ public $name = 'ichiran';
76
+
77
+ //ページング設定
78
+
79
+ public $paginate = array(
80
+
81
+ 'ichiran' => array(
82
+
83
+ 'limit' => 1000,
84
+
85
+ 'maxLimit' => 300,
86
+
87
+ 'joins' => array(
88
+
89
+ array(
90
+
91
+ 'type' => 'LEFT',
92
+
93
+ 'table' => 'makers',
94
+
95
+ 'alias' => 'MAKER',
96
+
97
+ 'conditions' => array('ichiran.maker_code = MAKER.id')
98
+
99
+ ),
100
+
101
+ array(
102
+
103
+ 'type' => 'LEFT',
104
+
105
+ 'table' => 'users',
106
+
107
+ 'alias' => 'ADMIN_USER',
108
+
109
+ 'conditions' => array('ichiran.administrator_code = ADMIN_USER.id')
110
+
111
+ ),
112
+
113
+ array(
114
+
115
+ 'type' => 'LEFT',
116
+
117
+ 'table' => 'users',
118
+
119
+ 'alias' => 'USER_USER',
120
+
121
+ 'conditions' => array('ichiran.user_code = USER_USER.id')
122
+
123
+ )
124
+
125
+ )
126
+
127
+ )
128
+
129
+ );
130
+
131
+
132
+
133
+ function index() {
134
+
135
+
136
+
137
+ $this->autoLayout = FALSE;
138
+
139
+ ```