質問編集履歴
1
対象のコードの前を追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,3 +3,23 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
これは何をやっているんでしょうか?
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
以下加筆↓
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
public function admin_change_permission($id,$permission = 1,$registration = null){
|
14
|
+
|
15
|
+
$park = $this->Prak->findById($id);
|
16
|
+
|
17
|
+
if($permission == 0){
|
18
|
+
|
19
|
+
$this->Park->updateAll(['Park.permitted_flag' => $permission],['Park.id' => $id]);
|
20
|
+
|
21
|
+
$this->Flash->success('非掲載にしました');
|
22
|
+
|
23
|
+
return $this->redirect(['action' => 'index']);
|
24
|
+
|
25
|
+
}
|