Skip to content

Instantly share code, notes, and snippets.

@muya muya/yii-actionAdmin.php
Last active Dec 17, 2015

What would you like to do?
Snippet for Yii's actionAdmin function in the Controller class
* UsersController actionAdmin function
public function actionAdmin() {
$model = new Users('search');
$model->unsetAttributes(); // clear any default values
if (isset($_GET['Users']))
$model->attributes = $_GET['Users'];
$this->render('admin', array(
'model' => $model,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.