Your IP : 216.73.216.79


Current Path : /var/www/html/school/backend/models/
Upload File :
Current File : /var/www/html/school/backend/models/RosMakMesyuaratAjkSearch.php

<?php

namespace backend\models;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\models\RosMakMesyuaratAjk;  //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 RosMakMesyuaratAjkSearch extends RosMakMesyuaratAjk
{
    /**
     * masukkan nama bidang table db
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id_mak_ajk','bil_hadir','bil_ajk','akuan_setuju','akui_ajk','kod_status_permohonan','pem_caw'], 'integer'],
            [['no_pertubuhan','created_date','created_by','modified_by','modified_date','no_cawangan','mesy','tarikh_mesy','tarikh_akuan','tarikh_hantar','ro'], '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 = RosMakMesyuaratAjk::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([
            'id_mak_ajk' => $this->id_mak_ajk,
            'no_pertubuhan' => $this->no_pertubuhan,
            'no_cawangan' => $this->no_cawangan,
            'mesy' => $this->mesy,
            'tarikh_mesy' => $this->tarikh_mesy,
            'bil_hadir' => $this->bil_hadir,
            'bil_ajk' => $this->bil_ajk,
            'akuan_setuju' => $this->akuan_setuju,
            'tarikh_akuan' => $this->tarikh_akuan,
            'tarikh_hantar' => $this->tarikh_hantar,
            'akui_ajk' => $this->akui_ajk,
            'kod_status_permohonan' => $this->kod_status_permohonan,
            'ro' => $this->ro,
            'pem_caw' => $this->pem_caw,
            'created_at' => $this->created_date,
            'created_by' => $this->created_by,
            'updated_at' => $this->modified_date,
            'updated_by' => $this->modified_by,
        ]);

        return $dataProvider;
    }
}