Your IP : 216.73.216.79


Current Path : /var/www/html/chatbot/backend/models/
Upload File :
Current File : /var/www/html/chatbot/backend/models/RosPertubuhanIndukSearch.php

<?php

namespace backend\models;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\models\RosPertubuhanInduk;  //masukkan nama model tanpa .php atau nama class model

/**
 * Ubah nama kelas mengikut nama class model 
 * AdmNegaraSearch represents the model behind the search form of `backend\models\ContentFaq`.
 */
class RosPertubuhanIndukSearch extends RosPertubuhanInduk
{
    /**
     * masukkan nama bidang table db
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['kod_daerah_kecil_p', 'kod_daerah_kecil','bil_ahli_mesy','id_pembayaran','id_osol','kod_status_permohonan','akui_ajk','bubar','aktif_rayuan','kod_daerah_kecil_asal','kuiri','migrate_stat','migrate_ajk','migrate_undang','reply_notis'], 'integer'],
            [['id_pertubuhan','no_pertubuhan','created_date','created_by','modified_by','modified_date','nama_pertubuhan','nama_ringkas','taraf_pertubuhan','no_pengenalan','kod_kategori_jppm','kod_subkategori','no_rujukan_surat','kod_negara_p','kod_negeri_p','kod_daerah_p','kod_bandar_p','bandar_p','poskod_p','alamat_p','kod_negara','kod_negeri','kod_daerah','kod_bandar','bandar','poskod','alamat','no_tel_pertubuhan','no_faks_pertubuhan','email_pertubuhan','kod_status_pertubuhan','akuan','kod_ptj','no_resit','status_resit','NoPPM_lama','NoPPP_lama','nama_bank','no_rujukan_bank','ro','ro_batal','ro_update','nama_asal','alamat_asal','kod_negeri_asal','kod_daerah_asal','poskod_asal','bandar_asal','notis_1','note_ro','migrate_stat','migrate_ajk','migrate_undang','tarikh_alih','reply_notis','stat_bebas','stat_pindakecaw','rayuan_penyata','tarikh_reconcile','flat_batal','flat_padam','nama_setiausaha'], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function scenarios()
    {
        // bypass scenarios() implementation in the parent class
        return Model::scenarios();
    }

    /**
     * Ubah atau tambah pada $this-> bidang yang anda hendak masukkan dalam pencarian
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params)
    {
        $query = RosPertubuhanInduk::find();

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere(['like','no_pertubuhan', $this->no_pertubuhan]);
        $query->andFilterWhere(['like','nama_pertubuhan', $this->nama_pertubuhan]);
        $query->andFilterWhere(['like','nama_ringkas', $this->nama_ringkas]);

        return $dataProvider;
    }
}