public function actionJsonView()
{
$model=Employees::model()->find((int)$_GET["id"]);
if($model===null)
throw new CHttpException(404,'The requested page does not exist.');
}
I access it as r=employees/view&id=51 only
The above code works fine but if i change it to
public function actionJsonView($id)
{
$model=Employees::model()->find((int)$id);
if($model===null)
throw new CHttpException(404,'The requested page does not exist.');
}
It always goes to 404. This is who i access r=employees/view/51.
First is this possible or i have to acess it as r=employees/view&id=51 only