Yii 1.1: yiiparsedb

This adds parse.com database to your application where you can operate parse objects from Yii

...overview of the extension...


Yii 1.1 or above


Download and extract ParseYii extension and put in protected/extensions then open parse.php file there you can find code for defining constants as below

       const APP_ID="";
   const REST_API_ID ="";
   const MASTER_ID ="";

find your parse.com application details and put in front of right constants.

then open your application's /protected/config/main.php file

there add this parse array in components array

          'parse' => array(
        'class' => 'application.extensions.ParseYii.Parse',

I have Users class/table in parse.com which contains

{ "createdAt": "2014-08-21T09:08:17.460Z", "email": "khajaamin@gmail.com", "first_name": "khajaamin", "last_name": "attar", "objectId": "VswIdA5gWo", "password": "123456", "updatedAt": "2014-08-21T09:08:17.460Z" },

in your actions or module put this simple code for usage of your class from parse.com


Note : change array key and value whatever your class having in the parse.com's class for storing data.

Now this is working for simple operation i request to build whatever you can or you can request e to build it for you

coming soon with great Yii & Angular framework


Total 7 comments

#18582 report it
khajaamin at 2014/11/21 12:48am
Please check with your variable $dataprovider and $data

I think it is because only you have created

$dataprovider= Yii: :app()->parse->setTable('_Users'); variable $dataProvieder and after

using $this->render('parse',array('data'=>$data)); <<<<

$data to send it to the view please check if it is right . and then you have to us

'dataProvider' => $dataProvider, <<<< here in grid view

new code

'dataProvider' => new CArrayDataProvider($dataProvier),

in CgridView.

good Luck

#18581 report it
frijj2k at 2014/11/20 05:40pm
Is this compatible with Yii2

Is this extension compatible with Yii2?


#18552 report it
manojvelyalan at 2014/11/15 03:09am
not able to filter like cgridview..

Hi khajaamin,varadk

I implemented with arrayProvider.Actually what i am looking for make a filter like cgridview..I think if i use arrayProvider there is nothing like filter, if you have any solution for arrayprovider with filter please let me know how i can implement in my project..


#18551 report it
khajaamin at 2014/11/14 01:09pm
Please convert your dataprovider into arrayProvider

this is yii method please seach for that while i will create the the full code.

please read this for refrance .. http://yiiplayground.com/index.php?r=UiModule/dataview/gridViewArray

#18545 report it
varadk at 2014/11/13 11:58pm
What error you are getting?

Hi Manoj , Please brief what error you are getting. As per my knowledge, if you are using data provider with parse you need to override all methods for dataprovider which yii implements without using parse.You need to crate your own dataprovider

And one more thing ,Write all the parse code in extension application.extensions.ParseYii.Parse .i.e (Parse.php file) and call these functions wherever required in Model/View/Controller .Don't define Parse functions in Model/View/controller

//in application.extensions.ParseYii.Parse (Parse.php)
public function getAllQuestionData($qid)
    $query = new ParseQuery($this->table);
        $results = $query->find();
        //echo "<pre>";print_r($results);exit;
        return  $results;
//in controller
public function actionView($id)
$obj = Yii::app()->parse->setTable('qt_question');
//in view
//access $data1 as type and do further processing
    'data' =>$model ,
?>&nbsp;&nbsp;;<?php echo "       Question Type ".$type."<br>";

good luck

#18525 report it
manojvelyalan at 2014/11/10 06:36am
how can list user table in parase.com in yii gridview

Hi, I am using following code for displying userdata in gridview

 public function actionDisplay(){
            $dataProvider= Yii::app()->parse->setTable('_Users');
public function fetchusers() {
        $query = new \Parse\ParseQuery("_User");
        $results = $query->find();
        return $results;
$this->widget('zii.widgets.grid.CGridView', array(
    'dataProvider' => $dataProvider,
    'columns' => array('key', 'value'),

but getting error...

#18098 report it
varadk at 2014/09/08 03:40am
This is working .

Thank you very much for this extension.This is working successfully.

Leave a comment

Please to leave your comment.

Create extension