Reputation: 545
i'm using yii framework to develop, everything works fine when i was in development.
This morning I added a new route and push it to the server but i can't access it, i got a 404 page not found. I try to change access rules to make it accessible by every one but nothing change, still 404. I m trying to access to update method via this url: index.php?r=adminuser/update&id=5
Here is the code of the controller:
class AdminUserController extends Controller {
public function filters()
{
return array(
'accessControl', // perform access control for CRUD operations
);
}
public function accessRules()
{
return array(
array('allow',
'actions' => array('index', 'create', 'update'),
'users' => array('@'),
),
array('allow',
'actions' => array('admin', 'delete'),
'roles' => array('admin'),
),
array('deny', // deny all users
'users' => array('*'),
),
);
}
public function actionUpdate($id)
{
$model=$this->loadModel($id);
if(isset($_POST['AdminUser']))
$model->save($_POST['AdminUser'])
$this->render('update',array(
'model'=>$model,
));
}
}
Thanks you for those who can help me.
Upvotes: 2
Views: 144