I have menu like this on layouts/main.php:
array('label'=>'Data Loket', 'url'=>array('/loket/view', 'id' => Yii::app()->loket->id), 'visible'=>Yii::app()->user->getLevel()==3),
I want to show the list 'loket' based on its Id. So I add 'id' => Yii:app()->loket->id
, but it throws error Property "CWebApplication.loket" is not defined.
How to fix this error? Help me please, I just a newbie. Thanks
Get the results using the following code:
$loket = Loket::model()->findByAttributes(array('id_nomer' => $this->id_nomer));
$loket_data = $loket->attributes;
$loket_id = $locket_data['id']
You can shorten this, but I broke it up into 2 steps to show the progression.