I am trying to access the authAssignment/admin I am getting the following error:
This is what is in my DB:
AuthAssignment:
[{"itemname":"admin", "bizrule":"", "data":"", "user_id":0}]
User:
{"id":2, "user_type":"", "username":"test@gmail.com", "password":"4fbeb3d93d5408df1eeb22bf12078442", "email":"test@gmail.com", "mobilephone":"5555555555", "lastip":"", "lastlogin":"2016-01-01 01:00:00", "resetmode":0, "resetpass":"", "resettime":"2016-01-01 01:00:00", "role_id":2}}
AuthAssignmentController.php
public function actionAdmin()
{
$model=new AuthAssignment('search');
$model->unsetAttributes(); // clear any default values
if(isset($_GET['AuthAssignment']))
$model->attributes=$_GET['AuthAssignment'];
$this->render('admin',array(
'model'=>$model,
));
}
models/AuthAssignment.php
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'user' => array(self::BELONGS_TO, 'User', 'user_id'),
'itemname0' => array(self::BELONGS_TO, 'AuthItem', 'itemname'),
);
}
views/authAssignment/admin.php
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'auth-assignment-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'itemname',
'bizrule',
'data',
'user_id',
array(
'class'=>'CButtonColumn',
),
),
));
Why am I getting a 500 error?