Merhaba arkadaşlar,

Aşağıdaki gibi bir kod satırım var.

            $data = [
                'title' => $this->request->getVar('title'),
                'cid' => $this->request->getVar('cid'),
                'openingSpeech' => $this->request->getVar('openingSpeech'),
                'isPublic' => $this->request->getVar('isPublic'), 
                'uid' => '1',
                'reminder' => $this->request->getVar('reminder'),
                'createdAt' =>  date('Y-m-d H:i:s')
            ];
Form'dan gelen veri isPublic için On yada boş, on durumunda 1, boş durumunda ise 0 yapmak istiyorum. Yardımcı olur musunuz?